Cancel
Cancels all callbacks from the event source.
Declaration
virtual kern_return_t Cancel(IODispatchSourceCancelHandler handler);Parameters
- handler:
The handler block to execute after the dispatch source finishes any in-flight callbacks.
Return Value
kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.
Discussion
After cancellation, the source can only be freed. It cannot be reactivated.