IsolateRunner<T> class

An IsolateRunner is a runner for executing a computation in a separate Isolate, with the possibility of externally controlled cancellation with immediate termination, with termination when control is yielded back to the event loop, or with termination using cancellation token.

Constructors

IsolateRunner(FutureOr<T> computation(), {CancellationToken? token})
Creates an instance of IsolateRunner.

Properties

hashCode int
The hash code for this object.
no setterinherited
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
run() Future<T>
Executes the computation and returns the computation result (or throws the exception), or throws the CancellationException exception if the terminate method was called before the computation was completed.
terminate({bool immediate = false}) → void
Requests to terminate the execution of a computation.
toString() String
A string representation of this object.
inherited

Operators

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