isolate_runner_mixin library
Classes
- SpawnWorkerOptions
- Options for spawned worker behavior.
Enums
- IsolateRunMode
- Controls where IsolateRunnerMixin.runInIsolate executes a task.
Mixins
- IsolateRunnerMixin
-
A mixin to provide a convenient
runInIsolatemethod to any class.
Typedefs
-
IsolateWorkerHandler
= FutureOr<
Object?> Function(String command, Object? payload) - Worker request handler used by IsolateRunnerMixin.spawnWorker.
Exceptions / Errors
- IsolateWorkerDisposedException
- Thrown when the worker isolate is disposed while requests are pending.
- IsolateWorkerException
- Base exception type for spawned worker operations.
- IsolateWorkerNotInitializedException
- Thrown when a request is attempted before a worker handler is registered.
- IsolateWorkerPayloadException
- Thrown when request payload/result does not satisfy the package payload contract.
- IsolateWorkerQueueOverflowException
- Thrown when pending request count exceeds SpawnWorkerOptions.maxPendingRequests.
- IsolateWorkerRemoteException
- Thrown when a worker handler request fails in the worker isolate.
- IsolateWorkerTerminatedException
- Thrown when the worker isolate terminates unexpectedly.