]> git.ipfire.org Git - thirdparty/asterisk.git/commit
threadpool: Handle worker thread transitioning to dead when going active. 02/1602/4
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:06:36 +0000 (15:06 -0400)
commitb818d70533916aa80af7607f225e0b1e98f41648
treee5533fd10088ba8e9a00430a3e436fa0ff5f1a6c
parentdac0bf063c756ce737aa84b246a7c4e6c317b696
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