Github user tpcwang commented on a diff in the pull request: https://github.com/apache/thrift/pull/980#discussion_r61534321 --- Diff: lib/cpp/src/thrift/concurrency/ThreadManager.cpp --- @@ -421,7 +416,7 @@ void ThreadManager::Impl::removeWorker(size_t value) { { Synchronized s(workerMonitor_); - while (workerCount_ != workerMaxCount_) { + while (workerCount_ > goalCount) { --- End diff -- I would be happy to give my vote for this to be merged in, if you can address my concern on the change in this file. I still don't think this new implementation correctly handles concurrent addWorker/removeWorker calls. I also think the existing implementation actually handles concurrent removeWorker calls correctly, so it is not clear to me why this change is necessary. Sorry if I miss anything obvious.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. ---