Cancellation Source¶
Import: import system.core;
CancellationSource¶
Cooperative cancellation flag shared with tokens from a CancellationSource. @shared so a token/source can be captured into a Task.spawn body and polled cross-thread.
constructor¶
Creates a source that is not yet cancelled.
is_cancelled¶
True after cancel has been called.
cancel¶
Marks this source (and all of its tokens) as cancelled.
token¶
Returns a token that observes this source's cancelled state.