Instance Method


Cancels the current work item asynchronously.


func cancel()


Cancellation causes future attempts to execute the work item to return immediately. Cancellation does not affect the execution of a work item that has already begun.

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).

See Also

Canceling a Work Item

var isCancelled: Bool

A Boolean value indicating whether the work item has been canceled.