OSSCancellationTokenSource Class Reference
Inherits from | NSObject |
Declared in | OSSCancellationTokenSource.h OSSCancellationTokenSource.m |
Overview
OSSCancellationTokenSource represents the producer side of a CancellationToken. Signals to a CancellationToken that it should be canceled. It is a cancellation token that also has methods for changing the state of a token by cancelling it.
Tasks
-
+ cancellationTokenSource
-
token
property -
cancellationRequested
property -
– cancel
-
– cancelAfterDelay:
-
– dispose
Properties
Instance Methods
cancel
Cancels the token if it has not already been cancelled.
- (void)cancel
Discussion
Cancels the token if it has not already been cancelled.
Declared In
OSSCancellationTokenSource.h
cancelAfterDelay:
Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds.
- (void)cancelAfterDelay:(int)millis
Parameters
- millis
The number of milliseconds to wait before completing the returned task. If delay is
0
the cancel is executed immediately. If delay is-1
any scheduled cancellation is stopped.
Discussion
Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds.
Declared In
OSSCancellationTokenSource.h