WorkersConfig class
Configuration for spawning workers.
Constructors
- WorkersConfig({required int numberOfWorkers, String workerScriptUrl = './packages/wasm_run/assets/wasm.worker.js', String? workerMapImportsScriptUrl, void onWorkerMessage(Object?)?})
- Configuration for spawning workers.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- numberOfWorkers → int
-
The number of threads or workers to spawn
final
- onWorkerMessage → (void Function(Object?)?)
-
A callback that is executed when a web worker sends a message.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- workerMapImportsScriptUrl → String?
-
The web worker map imports url. Th import should have a function
mapWorkerWasmImports
that takes a MapImportsArgs defined in the following js example code and returns an map of wasm imports This is a url to a js file that exports a function that maps the wasm imports. It is called with the following arguments:final - workerScriptUrl → String
-
The web worker script url
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited