pub unsafe extern "C" fn async_cancel_task(
dispatcher: *mut async_dispatcher_t,
task: *mut async_task_t,
) -> zx_status_tExpand description
Cancels the task associated with |task|.
If successful, the task’s handler will not run.
Returns |ZX_OK| if the task was pending and it has been successfully canceled; its handler will not run again and can be released immediately. Returns |ZX_ERR_NOT_FOUND| if there was no pending task either because it already ran, had not been posted, or has been dequeued and is pending execution (perhaps on another thread). Returns |ZX_ERR_NOT_SUPPORTED| if not supported by the dispatcher.
This operation is thread-safe.