Contents

cancel()

Changes the cancelled state of the receiver to indicate that it should exit.

Declaration

func cancel()

Discussion

The semantics of this method are the same as those used for Operation. This method sets state information in the receiver that is then reflected by the isCancelled property. Threads that support cancellation should periodically call the isCancelled method to determine if the thread has in fact been cancelled, and exit if it has been.

For more information about cancellation and operation objects, see Operation.

See Also

Related Documentation

Stopping a Thread