X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FThreadPoolOptions.html;h=60c8b9170be2b789fdffa76d4ba5f5d8bed997fe;hb=904ddac9d4d1484aa4364ee8c042c62871ec2e39;hp=1a2b42339ddf8ad5ca81e45bb36915ffe81dce3e;hpb=603ce450e1c02a53a06aff9e9ba5f3cdee24a3f2;p=poolifier.git diff --git a/docs/interfaces/ThreadPoolOptions.html b/docs/interfaces/ThreadPoolOptions.html index 1a2b4233..60c8b917 100644 --- a/docs/interfaces/ThreadPoolOptions.html +++ b/docs/interfaces/ThreadPoolOptions.html @@ -1,253 +1,39 @@ -ThreadPoolOptions | poolifier - v2.6.34
-
- -
-
-
-
- -

Interface ThreadPoolOptions

-
-

Options for a poolifier thread pool.

-
-
-
-

Hierarchy

-
-
-
-
- -
-
-

Properties

-
enableEvents? +ThreadPoolOptions | poolifier - v3.0.13

Interface ThreadPoolOptions

Options for a poolifier thread pool.

+
interface ThreadPoolOptions {
    enableEvents?: boolean;
    enableTasksQueue?: boolean;
    errorHandler?: ErrorHandler<Worker>;
    exitHandler?: ExitHandler<Worker>;
    messageHandler?: MessageHandler<Worker>;
    onlineHandler?: OnlineHandler<Worker>;
    restartWorkerOnError?: boolean;
    startWorkers?: boolean;
    tasksQueueOptions?: TasksQueueOptions;
    workerChoiceStrategy?: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN";
    workerChoiceStrategyOptions?: WorkerChoiceStrategyOptions;
    workerOptions?: WorkerOptions;
}

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

-
\ No newline at end of file +

Properties

enableEvents?: boolean

Pool events integrated with async resource 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.

+

Default Value

() => {}

+
exitHandler?: ExitHandler<Worker>

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

+

Default Value

() => {}

+
messageHandler?: MessageHandler<Worker>

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

+

Default Value

() => {}

+
onlineHandler?: OnlineHandler<Worker>

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

+

Default Value

() => {}

+
restartWorkerOnError?: boolean

Restart worker on error.

+
startWorkers?: boolean

Whether to start the minimum number of workers at pool initialization.

+

Default Value

true
+
+
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

\ No newline at end of file