Add isc_async_current() macro to run job on current loop
Previously, isc_job_run() could have been used to run the job on the current loop and the isc_job_run() would take care of allocating and deallocating the job. After the change in this MR, the isc_job_run() is more complicated to use, so we introduce the isc_async_current() macro to suplement isc_async_run() when we need to run the job on the current loop.
This commit is contained in:
@@ -45,4 +45,10 @@ isc_async_run(isc_loop_t *loop, isc_job_cb cb, void *cbarg);
|
||||
*\li 'cbarg' is passed to the 'cb' as the only argument, may be NULL
|
||||
*/
|
||||
|
||||
#define isc_async_current(loopmgr, cb, cbarg) \
|
||||
isc_async_run(isc_loop_current(loopmgr), cb, cbarg)
|
||||
/*%<
|
||||
* Helper macro to run the job on the current loop
|
||||
*/
|
||||
|
||||
ISC_LANG_ENDDECLS
|
||||
|
||||
Reference in New Issue
Block a user