]> git.ipfire.org Git - thirdparty/asterisk.git/commit
threadpool: Handle worker thread transitioning to dead when going active. 03/1603/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:39 +0000 (14:18 -0500)
commit2954354404e915aa4d20f1ee400c8a3a835fac7b
tree009b7d00c9cbb96d00fdaa1f3580c94ea13534d0
parentc1abe8906dd4696bc85697cfbbff2c9fca6af4d6
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