Moved main thread object to libtorrent.

This commit is contained in:
rakshasa
2012-02-12 21:58:16 +09:00
parent 9ad22ab8ff
commit 47125b9c38
9 changed files with 36 additions and 153 deletions
+2 -1
View File
@@ -46,6 +46,7 @@
#include <unistd.h>
#include <rak/error_number.h>
#include <torrent/exceptions.h>
#include <torrent/torrent.h>
#include <torrent/utils/log.h>
#include "globals.h"
@@ -167,7 +168,7 @@ ThreadBase::interrupt_main_polling() {
int sleep_length = 0;
while (ThreadBase::is_main_polling()) {
pthread_kill(main_thread->m_thread, SIGUSR1);
pthread_kill(torrent::main_thread()->pthread(), SIGUSR1);
if (!ThreadBase::is_main_polling())
return;