Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WorkerPool<TIn, TOut>

Type parameters

  • TIn

  • TOut

Hierarchy

  • WorkerPool

Constructors

Properties

Methods

Constructors

constructor

Properties

Private cleanupInterval

cleanupInterval: ReturnType<typeof setInterval>

Private limit

limit: Limit = PLimit(Math.max(1, cpus().length))

Private source

source: string

Private workers

workers: Array<PoolWorker<TOut>> = []

Methods

Private createWorker

  • createWorker(): Worker & object

run

  • run(data: TIn): Promise<TOut>

Generated using TypeDoc