* Replaced TaskScheduler with rak::priority_queue.

* Fixed an exception caused by initial hash check not properly
cleaning up HashQueue when canceling.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@606 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-12-08 21:19:53 +00:00
parent ba7d61b532
commit 12ef47da3c
30 changed files with 362 additions and 367 deletions
+2 -3
View File
@@ -59,7 +59,6 @@ Control::Control() :
m_inputStdin->slot_pressed(sigc::mem_fun(m_input, &input::Manager::pressed));
m_taskShutdown.set_iterator(taskScheduler.end());
m_taskShutdown.set_slot(rak::mem_fn(this, &Control::receive_shutdown));
}
@@ -113,8 +112,8 @@ Control::receive_shutdown() {
m_core->shutdown(false);
m_shutdownReceived = true;
if (!taskScheduler.is_scheduled(&m_taskShutdown))
taskScheduler.insert(&m_taskShutdown, cachedTime + 5 * 1000000);
if (!m_taskShutdown.is_queued())
taskScheduler.push(m_taskShutdown.prepare(cachedTime + 5 * 1000000));
} else {
m_core->shutdown(true);