EasyCompute<R, I> class
- Inheritance
-
- Object
- EasyWorker<
MessageWithID< R> , I> - EasyCompute
Constructors
-
EasyCompute(ComputeEntrypoint<
I> entrypoint, {required String workerName, Duration? timeoutDuration})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isolate ↔ Isolate
-
The isolate instance attached to this worker.
latefinalinherited
- isReady → bool
-
check if this isolate is ready to accept message.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
MessageWithID< R> > -
listen for any message from this worker
no setterinherited
- timeoutDuration → Duration?
-
final
Methods
-
compute(
I payload) → Future< R> -
Spin up a short lived worker, execute the
entrypoint
and get the resultoverride -
dispose(
) → void -
dispose all the resources and close the worker
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onData(
MessageWithID< R> data) → void -
onMessage(
void onData(MessageWithID< R> )?, {Function? onError, void onDone()?, bool? cancelOnError}) → StreamSubscription -
listen for any message from this worker
inherited
-
pause(
) → void -
Requests the isolate to pause.
inherited
-
resume(
) → void -
Requests the isolate to resume again.
inherited
-
send(
I message) → Future< void> -
send message to this worker
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
waitUntilReady(
) → Future< void> -
wait until this worker spawns
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited