Inherits from NSObject
Declared in OSSCancellationToken.h
OSSCancellationToken.m

Overview

The consumer view of a CancellationToken. Propagates notification that operations should be canceled. A OSSCancellationToken has methods to inspect whether the token has been cancelled.

Properties

cancellationRequested

Whether cancellation has been requested for this token source.

@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested

Discussion

Whether cancellation has been requested for this token source.

Declared In

OSSCancellationToken.h

Instance Methods

registerCancellationObserverWithBlock:

Register a block to be notified when the token is cancelled. If the token is already cancelled the delegate will be notified immediately.

- (OSSCancellationTokenRegistration *)registerCancellationObserverWithBlock:(OSSCancellationBlock)block

Discussion

Register a block to be notified when the token is cancelled. If the token is already cancelled the delegate will be notified immediately.

Declared In

OSSCancellationToken.h