Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AutoReleaseWorkerPool

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

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Static DefaultOptionsSearch playground for DefaultOptions

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

Methods

disposeSearch playground for dispose

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

    Returns void

pushSearch playground for push

  • push(action: (worker: Worker, onComplete: () => void) => void): void
  • 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
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method