]> git.ipfire.org Git - thirdparty/asterisk.git/commit
threadpool: Handle worker thread transitioning to dead when going active. 04/1604/1
authorJoshua Colp <jcolp@digium.com>
Wed, 11 Nov 2015 17:04:08 +0000 (13:04 -0400)
committerJoshua Colp <jcolp@digium.com>
Wed, 11 Nov 2015 19:18:48 +0000 (14:18 -0500)
commitd073cb4b6d1b3e5638282cbeabbfa3adb981fde9
tree132397973b29566e584a0e0702b9c5aca87300da
parentb9713354dc64d17ffe384365b606c1cec101b47f
threadpool: Handle worker thread transitioning to dead when going active.

This change adds handling of dead worker threads when moving them
to be active. When this happens the worker thread is removed from
both the active and idle threads container. If no threads are able
to be moved to active then the pool grows as configured.

A unit test has also been added which thrashes the idle timeout
and thread activation to exploit any race conditions between the
two.

ASTERISK-25546 #close

Change-Id: I6c455f9a40de60d9e86458d447b548fb52ba1143
main/threadpool.c
tests/test_threadpool.c