SetEnableWithCompletion
Enables or disables the dispatch source.
Declaration
virtual kern_return_t SetEnableWithCompletion(bool enable, IODispatchSourceCancelHandler handler);Parameters
- enable:
A Boolean value that indicates whether to enable or disable the dispatch source. Specify
trueto enable the timer orfalseto disable it. - handler:
An optional handler block to execute after disabling the dispatch source. The dispatch source calls your handler after any in-flight callbacks finish.
Return Value
kIOReturnSuccess on success, or another value if an error occurs. See Error Codes.
Discussion
Subclasses must provide an implementation of this method.