mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-12 13:12:32 +00:00
* 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:
@@ -85,7 +85,6 @@ DownloadList::DownloadList(Control* c) :
|
||||
m_uiArray[DISPLAY_LOG] = new ElementLogComplete(&m_control->core()->get_log_complete());
|
||||
m_windowLog = new WLog(&m_control->core()->get_log_important());
|
||||
|
||||
m_taskUpdate.set_iterator(taskScheduler.end());
|
||||
m_taskUpdate.set_slot(rak::mem_fn(this, &DownloadList::task_update)),
|
||||
|
||||
setup_keys();
|
||||
@@ -112,7 +111,7 @@ DownloadList::activate() {
|
||||
if (is_active())
|
||||
throw std::logic_error("ui::Download::activate() called on an already activated object");
|
||||
|
||||
taskScheduler.insert(&m_taskUpdate, cachedTime + 1000000);
|
||||
taskScheduler.push(m_taskUpdate.prepare(cachedTime + 1000000));
|
||||
|
||||
m_windowTextInput->set_active(false);
|
||||
|
||||
@@ -304,7 +303,7 @@ void
|
||||
DownloadList::task_update() {
|
||||
m_windowLog->receive_update();
|
||||
|
||||
taskScheduler.insert(&m_taskUpdate, (cachedTime + 1000000).round_seconds());
|
||||
taskScheduler.push(m_taskUpdate.prepare((cachedTime + 1000000).round_seconds()));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -138,7 +138,7 @@ private:
|
||||
WInput* m_windowTextInput;
|
||||
WHttp* m_windowHttpQueue;
|
||||
|
||||
utils::TaskItem m_taskUpdate;
|
||||
rak::priority_item m_taskUpdate;
|
||||
|
||||
Download* m_uiDownload;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user