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.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666361 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/ThreadManager.cpp b/lib/cpp/src/concurrency/ThreadManager.cpp
index 604602e..34acc4c 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cpp
+++ b/lib/cpp/src/concurrency/ThreadManager.cpp
@@ -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 {