Similar to the WorkerPool class except it creates and destroys workers automatically with a maximum of
Workers are terminated when it is idle for at least
OptionsSearch playground for DefaultOptions
Default options for the constructor. Override to change the defaults.
Terminates all workers and clears any pending actions.
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.
action: ((worker: Worker, onComplete: (() => void)) => void)
onComplete: (() => void)