Interface ThreadPoolOptions

Options for a poolifier thread pool.

Hierarchy

Properties

enableEvents?: boolean

Pool events emission.

Default Value

true
enableTasksQueue?: boolean

Pool worker node 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.

restartWorkerOnError?: boolean

Restart worker on error.

tasksQueueOptions?: TasksQueueOptions

Pool worker node tasks queue options.

workerChoiceStrategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

The worker choice strategy to use in this pool.

Default Value

WorkerChoiceStrategies.ROUND_ROBIN
workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions

The worker choice strategy options.

workerOptions?: WorkerOptions

Worker options.

Generated using TypeDoc