new CancelToken(executor)
A CancelToken
is an object that can be used to request cancellation of an operation.
Parameters:
Name | Type | Description |
---|---|---|
executor |
function | The executor function. |
Methods
(static) source()
Returns an object that contains a new CancelToken
and a function that, when called,
cancels the CancelToken
.
subscribe()
Subscribe to the cancel signal
throwIfRequested()
Throws a Cancel
if cancellation has been requested.
unsubscribe()
Unsubscribe from the cancel signal