Author: dreiss
Date: Tue Jun 10 15:55:04 2008
New Revision: 666361

URL: http://svn.apache.org/viewvc?rev=666361&view=rev
Log:
Fix locking bug in ThreadManager.

It looks like the scheduler waits on monitor_, but the worker notifies
workerMonitor_. Also, it does so out of critical section.

Modified:
    incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp

Modified: incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp
URL: 
http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp?rev=666361&r1=666360&r2=666361&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp (original)
+++ incubator/thrift/trunk/lib/cpp/src/concurrency/ThreadManager.cpp Tue Jun 10 
15:55:04 2008
@@ -251,7 +251,7 @@
                thread that might be blocked on add. */
             if (manager_->pendingTaskCountMax_ != 0 &&
                 manager_->tasks_.size() == manager_->pendingTaskCountMax_ - 1) 
{
-              manager_->workerMonitor_.notify();
+              manager_->monitor_.notify();
             }
           }
         } else {


Reply via email to