Cleaned up thread code.

This commit is contained in:
rakshasa
2013-04-03 21:16:11 +09:00
parent 3b2a47a6d0
commit 7689059dbc
3 changed files with 3 additions and 26 deletions
-15
View File
@@ -162,18 +162,3 @@ ThreadBase::queue_item(thread_base_func newFunc) {
if (m_state == STATE_ACTIVE)
interrupt();
}
void
ThreadBase::interrupt_main_polling() {
int sleep_length = 0;
while (ThreadBase::is_main_polling()) {
torrent::main_thread()->interrupt();
if (!ThreadBase::is_main_polling())
return;
usleep(sleep_length);
sleep_length = std::min(sleep_length + 50, 1000);
}
}