CancellationToken class

A cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because the user continued to type.

To get an instance of a CancellationToken use a {@link CancellationTokenSource}.

Available extensions
Annotations

Constructors

CancellationToken({bool? isCancellationRequested, Event? onCancellationRequested})
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
isCancellationRequested ↔ bool

Available on CancellationToken, provided by the CancellationToken$Typings extension

Is true when the token has been cancelled, false otherwise.
getter/setter pair
onCancellationRequested ↔ Event

Available on CancellationToken, provided by the CancellationToken$Typings extension

An {@link Event} which fires upon cancellation.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited