tibrvEvent_DestroyEx()
Function
Declaration
tibrv_statustibrvEvent_DestroyEx
(
tibrvEvent event,
tibrvEventOnComplete completionFunction);
Purpose
Destroy an event, and run a completion function when all of the destroyed event’s callback functions are complete.
Remarks
Destroying an event object cancels interest in the specified event. Upon return from tibrvEvent_DestroyEx(), the destroyed event’s callback function is no longer dispatched.
It is legal for an event callback function to destroy its own event argument.
Although tibrvEvent_DestroyEx() prevents future dispatch calls from running the destroyed event’s callback function, that callback function might be already running in one or more threads that dispatch events from the same queue. In each thread where the callback function is already in progress, that callback function does continue to run until complete. Rendezvous software ensures that the completion function runs when the last callback-in-progress has completed; for important details, see tibrvEventOnComplete.
Destroying event interest invalidates the event object; passing the event object as an argument to subsequent API calls produces an error.
Parameter |
Description |
|
Cancel interest in this event. |
|
Rendezvous software runs this function immediately after all instances of the event’s callback function have completed. If the event’s callback function is not running when the event is destroyed, the destroy call runs it before returning. If this parameter is |