* Check if the thread is active before sending a signal.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1124 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-02-02 23:17:49 +00:00
parent 588f9e80c7
commit 2d3e12387d
+4 -1
View File
@@ -191,5 +191,8 @@ ThreadBase::call_queued_items() {
void
ThreadBase::queue_item(thread_base_func newFunc) {
m_threadQueue->push_back(newFunc);
pthread_kill(m_thread, SIGUSR1);
// Make it also restart inactive threads?
if (m_state == STATE_ACTIVE)
pthread_kill(m_thread, SIGUSR1);
}