summaryrefslogtreecommitdiff
path: root/main/bridging.c
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2013-06-20 16:29:35 +0000
committerMark Michelson <mmichelson@digium.com>2013-06-20 16:29:35 +0000
commit33eb15a242694e47707b70065c86fad19035d5c8 (patch)
treea5c0a5c953d6534e6049f9febfb5eca6a24abdba /main/bridging.c
parent6e6652518d43f26ac70ef6378b282464dcd62c50 (diff)
Fix threadpool rapid growth problem.
When a threadpool is set to autoincrement its threadcount, an issue may arise when multiple tasks are queued at once into the threadpool. Since threads start active, each new task would result in autoincrementing the thread count. So if all threads were active, and a thread's autoincrement value were 5, then 3 new tasks would result in 15 threads being created even though the initial autoincrement was sufficient to handle the number of tasks. This change introduces three behavior changes: 1) New threads in the threadpool start idle instead of active. 2) When a threadpool autoincrements, one thread is activated after the growth. 3) When a threadpool's size is incremented manually, all added threads are activated. For a more detailed explanation about the changes, please see the Review Board link at the bottom of this commit. Review: https://reviewboard.asterisk.org/r/2629 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/bridging.c')
0 files changed, 0 insertions, 0 deletions