A Promise which resolves once the Worker is ready to accept tasks
A queue of active tasks that this Worker is executing.
An auto-incrementing task index.
A path reference to the JavaScript file which provides companion worker-side functionality.
Load a function onto a given Worker. The function must be a pure function with no external dependencies or requirements on global scope.
The name of the function to load
A reference to the function that should be loaded
A Promise which resolves once the Worker has loaded the function.
Execute a task on a specific Worker.
The named function to execute on the worker. This function must first have been loaded.
An array of parameters with which to call the requested function
A Promise which resolves with the returned result of the function once complete.
Dispatch a task to a named Worker, awaiting confirmation of the result.
Data to dispatch to the Worker as part of the task.
A Promise which wraps the task transaction.
Handle messages emitted by the Worker thread.
The dispatched message event
Handle errors emitted by the Worker thread.
The dispatched error event
An asynchronous web Worker which can load user-defined functions and await execution using Promises.
The worker name to be initialized
Worker initialization options
Should the worker run in debug mode?
Should the worker automatically load the primitives library?