Interface PoolOptions<Worker>

Options for a poolifier pool.

Type Parameters

  • Worker extends IWorker

    The worker type.

Hierarchy

Properties

enableEvents?: boolean

Pool events emission.

Default Value

true

enableTasksQueue?: boolean

Pool worker tasks queue.

Default Value

false

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.

tasksQueueOptions?: TasksQueueOptions

Pool worker tasks queue options.

workerChoiceStrategy?: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"

The worker choice strategy to use in this pool.

workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions

The worker choice strategy options.

Generated using TypeDoc