Sets the cancellation handler function for the given dispatch source.
- iOS 4.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The dispatch source to modify. This parameter cannot be
The cancellation handler function to submit to the source's target queue. The context parameter passed to the event handler function is the current context of the dispatch source at the time the handler call is made.
The cancellation handler (if specified) is submitted to the source's target queue in response to a call to
dispatch when the system has released all references to the source's underlying handle and the source's event handler block has returned.