Options
All
  • Public
  • Public/Protected
  • All
Menu

Similar to the WorkerPool class except it creates and destroys workers automatically with a maximum of maxWorkers workers. Workers are terminated when it is idle for at least idleTimeElapsedBeforeRelease milliseconds.

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

Default options for the constructor. Override to change the defaults.

Methods

  • dispose(): void
  • Terminates all workers and clears any pending actions.

    Returns void

  • push(action: ((worker: Worker, onComplete: (() => void)) => void)): void
  • 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)
        • (worker: Worker, onComplete: (() => void)): void
        • Parameters

          • worker: Worker
          • onComplete: (() => void)
              • (): void
              • Returns void

          Returns void

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme