WorkerDelegator class abstract

A class helping for easier bridging between IsolatedWorker and JsIsolatedWorker.

It will call WorkerDelegate.defaultDelegate when running on Dart VM.

When running on Web, it will call WorkerDelegate.jsDelegate instead.

Constructors

WorkerDelegator()
Returns a singleton instance of WorkerDelegator
factory
WorkerDelegator.asNewInstance({Iterable<WorkerDelegate> delegates})
factory

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

addAllDelegates<Q, R>(Iterable<WorkerDelegate<Q, R>> delegates) → void
Adds new multiple WorkerDelegates.
addDelegate<Q, R>(WorkerDelegate<Q, R> delegate) → void
Adds a new WorkerDelegate with its WorkerDelegate.key.
close() → void
Closes the worker.
importScripts(List<String> scripts) Future<bool>
Executes JsIsolatedWorker.importScripts when running on Web.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run<Q, R>(Object key, dynamic message) Future<R>
Executes a callback that is associated with the key.
toString() String
A string representation of this object.
inherited

Operators

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