Fixed a few problems found on linux x86_64 version
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664728 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/cpp/src/concurrency/ThreadManager.cc b/lib/cpp/src/concurrency/ThreadManager.cc
index 69a96ff..0aa4bef 100644
--- a/lib/cpp/src/concurrency/ThreadManager.cc
+++ b/lib/cpp/src/concurrency/ThreadManager.cc
@@ -164,7 +164,7 @@
_manager->_workerCount++;
- _manager->_monitor.notify();
+ _manager->_monitor.notifyAll();
}
do {
@@ -358,10 +358,8 @@
/* If queue was empty notify a thread, otherwise all worker threads are running and will get around to this
task in time. */
- if(isEmpty) {
+ if(isEmpty && _idleCount > 0) {
- assert(_idleCount == _workerCount);
-
_monitor.notify();
}
}