Cancel
Cancel all callbacks from the dispatch 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
Subclasses must provide an implementation of this method. After cancellation, the dispatch source can only be freed. It cannot be reactivated.