[asterisk-dev] [Code Review]: Add a serializer interface to the threadpool

David Lee reviewboard at asterisk.org
Mon Feb 11 16:32:55 CST 2013



> On Feb. 11, 2013, 3:22 p.m., Mark Michelson wrote:
> > /trunk/tests/test_threadpool.c, lines 1589-1600
> > <https://reviewboard.asterisk.org/r/2323/diff/3/?file=33378#file33378line1589>
> >
> >     Your new change results in two different threadpool serializer names. This test should have failed.

And it does fail. Fixed.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2323/#review7843
-----------------------------------------------------------


On Feb. 11, 2013, 2:22 p.m., David Lee wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/2323/
> -----------------------------------------------------------
> 
> (Updated Feb. 11, 2013, 2:22 p.m.)
> 
> 
> Review request for Asterisk Developers and Mark Michelson.
> 
> 
> Summary
> -------
> 
> This patch adds the ability to create a serializer from a thread pool. A
> serializer is a ast_taskprocessor with the same contract as a default
> taskprocessor (tasks execute serially) except instead of executing out
> of a dedicated thread, execution occurs in a thread from a
> ast_threadpool. Think of it as a lightweight thread.
> 
> While it guarantees that each task will complete before executing the
> next, there is no guarantee as to which thread from the pool individual
> tasks will execute. This normally only matters if your code relys on
> thread specific information, such as thread locals.
> 
> This patch also fixes a bug in how the 'was_empty' parameter is computed
> for the push callback.
> 
> 
> Diffs
> -----
> 
>   /trunk/include/asterisk/threadpool.h 381085 
>   /trunk/main/taskprocessor.c 381085 
>   /trunk/main/threadpool.c 381085 
>   /trunk/tests/test_taskprocessor.c 381085 
>   /trunk/tests/test_threadpool.c 381085 
> 
> Diff: https://reviewboard.asterisk.org/r/2323/diff
> 
> 
> Testing
> -------
> 
> Unit testing.
> 
> 
> Thanks,
> 
> David
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130211/f52c5756/attachment-0001.htm>


More information about the asterisk-dev mailing list