Class WorkerPool
Hierarchy (View Summary)
- WorkerPool
Implements
Methods
dispose
-
Terminates all workers and clears any pending actions.
Returns void
push
-
Pushes an action to the worker pool. If all the workers are active, the action will be pended until a worker has completed its action.
Parameters
- action: (worker: Worker, onComplete: () => void) => void
The action to perform. Call onComplete when the action is complete.
Returns void
- action: (worker: Worker, onComplete: () => void) => void
Helper class to push actions to a pool of workers.