Github user jeking3 commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1103#discussion_r81527972
--- Diff: lib/cpp/src/thrift/concurrency/ThreadManager.cpp ---
@@ -339,103 +357,88 @@ void ThreadManager::Impl::addWorker(size_t value) {
idMap_.insert(std::pair<const Thread::id_t, shared_ptr<Thread>
>((*ix)->getId(), *ix));
--- End diff --
Okay actually that comment was wrong. maxMonitor_ will wake under two
conditions - one is that there's enough room to add a task. The other was not
coded and that is during stop. If there was a thread in add() and someone
called stop() it needs to signal maxMonitor_ and if the thread manager is no
longer started we need to throw the illegal state exception since it's bieng
stopped.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---