Interface PoolOptions<Worker>

Options for a poolifier pool.

Type Parameters

  • Worker

Hierarchy

Properties

enableEvents?: boolean

Pool events emission.

Default Value

true

errorHandler?: ErrorHandler<Worker>

A function that will listen for error event on each worker.

exitHandler?: ExitHandler<Worker>

A function that will listen for exit event on each worker.

messageHandler?: MessageHandler<Worker>

A function that will listen for message event on each worker.

onlineHandler?: OnlineHandler<Worker>

A function that will listen for online event on each worker.

workerChoiceStrategy?: "ROUND_ROBIN" | "LESS_RECENTLY_USED" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"

The worker choice strategy to use in this pool.

Generated using TypeDoc