Create longer thread destruction test.
authorMark Michelson <mmichelson@digium.com>
Sun, 9 Dec 2012 18:56:25 +0000 (18:56 +0000)
committerMark Michelson <mmichelson@digium.com>
Sun, 9 Dec 2012 18:56:25 +0000 (18:56 +0000)
commit293b18ecce9ef4c0d6540fdd7cf324dd1cab9e38
tree835c102200c705f106b5dd39779990c36ed09007
parent75559a4c429db8e41d59a4ac6bd4a4757a530b2f
Create longer thread destruction test.

This one involves shrinking the threadpool in such
a way that both idle and active threads are affected.

This test made me re-realize why the zombie state exists,
so I re-added it. We don't want to clog up the control
taskprocessor by waiting on active threads to complete
what they are doing. Instead, we mark them as zombies so
that when they are done, they can clean themselves up
properly.

Without the zombie state available, the new test actually
will deadlock.

git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@377474 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/threadpool.c
tests/test_threadpool.c