Function

dispatch_source_set_event_handler_f

Sets the event handler function for the given dispatch source.

Declaration

void dispatch_source_set_event_handler_f(dispatch_source_t source, dispatch_function_t handler);

Parameters

source

The dispatch source to modify. This parameter cannot be NULL.

handler

The event 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. This parameter cannot be NULL.

Discussion

The event handler (if specified) is submitted to the source's target queue in response to the arrival of an event.

See Also

Managing Event Handlers

dispatch_source_set_registration_handler_f

Sets the registration handler function for the given dispatch source.

dispatch_source_set_registration_handler

Sets the registration handler block for the given dispatch source.

dispatch_source_set_event_handler

Sets the event handler block for the given dispatch source.

dispatch_source_set_cancel_handler_f

Sets the cancellation handler function for the given dispatch source.

dispatch_source_set_cancel_handler

Sets the cancellation handler block for the given dispatch source.