Hi, John!
Some answers below:
My question is this: Can I use async() or launch() as a wrapper for a
cache_store() function call made from within an event handler?
Calling async() or launch() from an event handler SHOULD work (see
below). Unfortunately, the "cache_" family of functions do not have
async support.
Is there any
advantage to doing so or can I regard event handlers as a safe place to
initiate blocking operations because, I assume, events must already have
their own queue.
This is where it gets interesting -- in many cases, which include the
usrloc save() operation, the event handlers are ran inline with the SIP
processing, by the same process! So performing a blocking operation in
that context still has the unpleasant potential to bog down your SIP
processing responsiveness/latencies.
Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users