dispatch_block_cancel
Cancels the specified dispatch block asynchronously.
Declaration
extern void dispatch_block_cancel(dispatch_block_t block);Parameters
- block:
The dispatch block to cancel.
The result of passing
NULLor a block object not returned by the Dispatch_block_create or Dispatch_block_create_with_qos_class function is undefined.
Discussion
Cancellation causes any future execution of the dispatch block to return immediately, but does not affect any execution of the block object that is already in progress.
Release of any resources associated with the block object is delayed until execution of the block object is next attempted (or any execution already in progress completes).