X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fapi.md;h=0474e2aabea3a2196d7a3a105f46377bfa8bd7b4;hb=0717df3dc168fc35b8268713ac8b7bde86f024a9;hp=1848c1306016fc9e9a780ba8d712704fe3f6efad;hpb=445264e81bd5f5294bea64a0ab396e9808fbece8;p=poolifier.git diff --git a/docs/api.md b/docs/api.md index 1848c130..0474e2aa 100644 --- a/docs/api.md +++ b/docs/api.md @@ -63,7 +63,7 @@ An object with these properties: - `WorkerChoiceStrategies.ROUND_ROBIN`: Submit tasks to worker in a round robin fashion - `WorkerChoiceStrategies.LEAST_USED`: Submit tasks to the worker with the minimum number of executed, executing and queued tasks - `WorkerChoiceStrategies.LEAST_BUSY`: Submit tasks to the worker with the minimum tasks total execution and wait time - - `WorkerChoiceStrategies.LEAST_ELU`: Submit tasks to the worker with the minimum event loop utilization (ELU) (experimental) + - `WorkerChoiceStrategies.LEAST_ELU`: Submit tasks to the worker with the minimum event loop utilization (ELU) - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN`: Submit tasks to worker by using a [weighted round robin scheduling algorithm](./../docs/worker-choice-strategies.md#weighted-round-robin) based on tasks execution time - `WorkerChoiceStrategies.INTERLEAVED_WEIGHTED_ROUND_ROBIN`: Submit tasks to worker by using an [interleaved weighted round robin scheduling algorithm](./../docs/worker-choice-strategies.md#interleaved-weighted-round-robin) based on tasks execution time (experimental) - `WorkerChoiceStrategies.FAIR_SHARE`: Submit tasks to worker by using a [fair share scheduling algorithm](./../docs/worker-choice-strategies.md#fair-share) based on tasks execution time (the default) or ELU active time @@ -93,9 +93,10 @@ An object with these properties: - `tasksQueueOptions` (optional) - The worker tasks queue options object to use in this pool. Properties: + - `queueMaxSize` (optional) - The maximum number of tasks that can be queued on a worker before flagging it as back pressured. It must be a positive integer. - `concurrency` (optional) - The maximum number of tasks that can be executed concurrently on a worker. It must be a positive integer. - Default: `{ concurrency: 1 }` + Default: `{ queueMaxSize: (pool maximum size)^2, concurrency: 1 }` #### `ThreadPoolOptions extends PoolOptions`