[sr-dev] async module -- workers

Matthew Williams matthew at flowroute.com
Tue Jun 28 18:20:26 CEST 2011

On Tue, Jun 28, 2011 at 1:40 AM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:

> Hello,
> On 6/26/11 10:15 PM, Matthew Williams wrote:
>> Hi Daniel,
>> Am I correct that t_continue continues processing in the process that
>> calls it? If so, would it make sense for the async module to have an api for
>> other asynchronous modules to hand off to its worker pool before calling
>> t_continue? Or would it be better for each module to have its own pool of
>> workers?
> right now the workers in async module are dummy timers to handle async
> delayed execution of next actions or specific route block. But there can be
> coded a single pool of workers and timers for async processing, might be a
> better solution overall.

I do think a common async worker pool would be a good solution. Otherwise,
each module that implements async operations will need its own pool.

What do you think, should the async module export an API function such as:

int async_continue(int thash, int tlabel, void* data, int

This would allow for optional data to be processed by a callback function
within the context of the worker process before t_continue is actually

Matthew Williams
Flowroute LLC
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20110628/bebc5865/attachment.htm>

More information about the sr-dev mailing list