feat: add `queueMaxSize` option to tasks queue options
[poolifier.git] / docs / api.md
index 62d694b6bbb4bf412176705e9f9ffbe2783150c1..0474e2aabea3a2196d7a3a105f46377bfa8bd7b4 100644 (file)
@@ -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`