LocalWorker class

Encapsulates the entirety of the local worker context. LocalWorker.start behaves as the main function.

LocalWorker's are intended to be Dart isolates. This wraps a ReceivePort, and SendPort as well as a Registry

Constructors

LocalWorker(ReceivePort _rx, SendPort _tx, {Registry? registry})
Construct a new worker with the given ReceivePort and SendPort

Properties

hashCode int
The hash code for this object.
no setterinherited
progress ProgressBloc
Allows tasks to access progress available to this worker.
final
registry → Registry
Allows tasks to access transformers available to this worker.
final
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
process(WorkerTask task) Future<WorkerResponse>
Process an incoming task
send(WorkerResponse message) → void
Send an outgoing response.
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

start(HandshakeMessage handshake) → void
Starts a new local worker that waits for incoming tasks. A SendPort must be provided via the HandshakeMessage