CancellationSignal class

Cooperative cancellation. Register resource cleanup before starting I/O.

Constructors

CancellationSignal()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isCancelled → bool
no setter
reason → String
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel([String reason = 'cancelled']) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCancel(void listener()) → void Function()
race<T>(Future<T> operation) → Future<T>
throwIfCancelled() → void
toString() → String
A string representation of this object.
inherited
withTimeout<T>(Future<T> operation, Duration timeout) → Future<T>
Deadline wrapper whose timer is released on cancellation as well as result. It deliberately does not cancel an opaque storage backend operation.

Operators

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