[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![./][2], Ken Hunt,
Fred Anderson![./][2], David M. Lee![./][2], 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/ljbmpd/images/icn_author.gif

   [2]: https://code.asterisk.org/code/static/ljbmpd/images/icn_complete.gif

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



More information about the asterisk-scf-dev mailing list