Changes the cancelled state of the receiver to indicate that it should exit.
- iOS 2.0+
- macOS 10.5+
- tvOS 9.0+
- watchOS 2.0+
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
is property. Threads that support cancellation should periodically call the
is 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