NativeTaskIsolate class final

A request/response worker that keeps one native task on one isolate.

Native task handles are created, invoked, and released on the worker rather than being passed between short-lived isolates. Commands and results must be sendable between Dart isolates.

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

dispose() → Future<void>
Releases the Dart isolate after the task's close command has completed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
request<T>(Object? command) → Future<T>
Sends one command and completes with its typed result.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

spawn({required NativeTaskWorkerFactory factory, required Object? initialMessage, String? debugName}) → Future<NativeTaskIsolate>
Starts a worker with factory and its sendable initialMessage.