Async-Calls API
A call is asynchronous if the caller proceeds after the call is made, and the callee receives the call during the next main loop iteration. Asynchronous calls help avoid nasty call-me-when-I-call-you loops that humans often have trouble understanding or implementing correctly.
Asynchronous calls are currently implemented via Squid events. The call event stores the pointer to the callback function and cbdata-protected callback data. To call a method of an object, the method is wrapped in a method-specific, static callback function and the pointer to the object is passed to the wrapper. For the method call to be safe, the class must be cbdata-enabled.
You do not have to use the macros below to make or receive asynchronous method calls, but they give you a uniform interface and handy call debugging.






Web Site Translations