dispatch_block_notify

Function dispatch_block_notify 

Source
pub unsafe extern "C" fn dispatch_block_notify(
    block: dispatch_block_t,
    queue: &DispatchQueue,
    notification_block: dispatch_block_t,
)
Expand description

Schedule a notification block to be submitted to a queue when the execution of a specified dispatch block object has completed.

This function will submit the notification block immediately if execution of the observed block object has already completed.

It is not possible to be notified of multiple executions of the same block object with this interface, use dispatch_group_notify() for that purpose.

A single dispatch block object may either be observed one or more times and executed once, or it may be executed any number of times. The behavior of any other combination is undefined. Submission to a dispatch queue counts as an execution, even if cancellation (dispatch_block_cancel) means the block’s code never runs.

If multiple notification blocks are scheduled for a single block object, there is no defined order in which the notification blocks will be submitted to their associated queues.

Parameter block: The dispatch block object to observe. The result of passing NULL or a block object not returned by one of the dispatch_block_create* functions is undefined.

Parameter queue: The queue to which the supplied notification block will be submitted when the observed block completes.

Parameter notification_block: The notification block to submit when the observed block object completes.