X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fapi.md;h=0474e2aabea3a2196d7a3a105f46377bfa8bd7b4;hb=e57eb4d0ea721c4dea66047c431d516f74270453;hp=a48f4c54c3977dadade267f0ef5ca50e3ae22fda;hpb=5137e2ae971a1af7de3afc12d4e2c6f5959199f4;p=poolifier.git diff --git a/docs/api.md b/docs/api.md index a48f4c54..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,8 +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`