* Fixed a race condition where the releasing of the global lock before calling polling would cause problems. Now a thread that acquires the global lock and wants to remove or change fd's from the main thread.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1182 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-10-22 11:31:11 +00:00
parent 0e69677dbc
commit b8d319a2fc
9 changed files with 34 additions and 5 deletions
+3 -1
View File
@@ -165,8 +165,10 @@ SCgi::receive_call(SCgiTask* task, const char* buffer, uint32_t length) {
slotWrite.set(rak::mem_fn(task, &SCgiTask::receive_write));
ThreadBase::acquire_global_lock();
// bool result = m_slotProcess(buffer, length, slotWrite);
ThreadBase::interrupt_main_polling();
bool result = xmlrpc.process(buffer, length, slotWrite);
ThreadBase::release_global_lock();
return result;