Hello,
On 21/11/16 06:41, Alex Balashov wrote:
Hi,
If I am using async_route() with delay, what is the relationship between the core async_workers parameter value and the async module 'workers' modparam?
This doc change was intended to clarify it, I think:
https://www.mail-archive.com/sr-dev@lists.sip-router.org/msg25002.html
But it does not for me:
Number of worker processes to be started to handle the asynchronous tasks for async_route() and async_sleep().
So, does that mean the module starts its own processes for these cases? If so, does that mean I don't need core async_workers at all? Or do I? If I do, what happens if I have fewer core async_workers than modparam workers? What if I have more? Should I aim to keep them in sync?
the workers param for async module was added with the first implementation of the module, as a proof of how to do async ops in kamailio.cfg besides the t_suspend()/t_continue().
As there were more components getting to do async ops, I added async_workers in the core so a common pool of extra processes is created and can be shared by many modules.
At this moment, from what I remember by heart, mysql module and async (when using async_task_route()) use async_workers from the core.
I don't recall exactly, but somehow I planned to switch async module to use only processes from the core, but I thought that it can break existing configs.
To answer further, you don't need to keep them in sycn and you don't need core async workers if you use only async_route() (or async_sleep(), but this one has some traps highlighted in the readme, so I try not to promote it that much).
Cheers, Daniel