[asterisk-scf-dev] CR-ASTSCF-79: ThreadPool Implementation

Crucible - All Open Reviews crucible at code.asterisk.org
Mon Apr 18 16:27:49 CDT 2011


Mark Michelson![AUTH][1], Kevin P. Fleming, Brent Eagles, Ken Hunt, Fred
Anderson, David M. Lee, Joshua Colp.

An implementation of a Thread Pool. Let me know if you see any major flaws or
have suggestions for improvement.


In addition, I've included a few changes I made to the WorkQueue
implementation:

  * Added a sample QueueListener called DefaultQueueListener that may be a
commonly used listener for WorkQueues.

  * Fixed up a potential error in the WorkQueue and SuspendableWorkQueue to
ensure members are destroyed in a sane order.

  * Added a test to TestWorkQueue.cpp to test the implementation of the
DefaultQueueListener. The DefaultQueueListener has also gotten a good workout
from the ThreadPool's tests since ThreadPools use a DefaultQueueListener
internally.


NOTE: Since I can't preview my review before the content goes live, I have
absolutely no idea if I put the correct commits for WorkQueue.cpp,
SuspendableWorkQueue.cpp and TestWorkQueue.cpp on here, so the content may
change very shortly...

**Under Review**

   [1]: https://code.asterisk.org/code/static/lho8pq/images/icn_author.gif

URL: https://code.asterisk.org/code/cru/CR-ASTSCF-79



More information about the asterisk-scf-dev mailing list