cpp: Fix a race/deadlock in ThreadManager
When removing a task from the pending queue, we were only notifying a
blocked thread waiting to enqueue a task if the number of pending tasks
was exactly one less than the limit. However, if two tasks are finished
at about the same time, this can result in two spots being freed up with
only one notify. With this change, we always notify on task completion,
eliminating the race/deadlock.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@920680 13f79535-47bb-0310-9956-ffa450edef68
1 file changed