X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=1c11c1a438d91feb02f9f9edd16933156fed5c9c;hb=ccb7d1a70cd9bd4eb050160517e5bc48311d014f;hp=0058f23c23024a3bcc5a484c0584e08d82b1a73a;hpb=67de15a041152a973334839ad2c73284b1b3cbb3;p=poolifier.git
diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html
index 0058f23c..1c11c1a4 100644
--- a/docs/interfaces/IPool.html
+++ b/docs/interfaces/IPool.html
@@ -42,7 +42,7 @@
+Defined in src/pools/pool.ts:125
@@ -76,7 +77,7 @@
Returns Promise<void>
+Defined in src/pools/pool.ts:166
Optional
Readonly
emitter
@@ -85,10 +86,12 @@
'full'
: Emitted when the pool is dynamic and full.
'busy'
: Emitted when the pool is busy.
+'error'
: Emitted when an uncaught error occurs.
+'taskError'
: Emitted when an error occurs while executing a task.
+Defined in src/pools/pool.ts:154
enableTasksQueue
enableTasksQueue: ((enable, tasksQueueOptions?) => void)
@@ -114,18 +117,18 @@
Returns void
+Defined in src/pools/pool.ts:191
execute
-execute: ((data?) => Promise<Response>)
+execute: ((data?, name?) => Promise<Response>)
Type declaration
-
setTasksQueueOptions
setTasksQueueOptions: ((tasksQueueOptions) => void)
@@ -159,7 +166,7 @@
Returns void
+Defined in src/pools/pool.ts:200
setWorkerChoiceStrategy
setWorkerChoiceStrategy: ((workerChoiceStrategy, workerChoiceStrategyOptions?) => void)
@@ -176,7 +183,7 @@
Parameters
-
-
workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
+workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"
-
@@ -185,7 +192,7 @@
Returns void
+Defined in src/pools/pool.ts:173
setWorkerChoiceStrategyOptions
setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)
@@ -207,7 +214,14 @@
Returns void
+Defined in src/pools/pool.ts:182
+
+Readonly
size
+size: number
+
Readonly
type
@@ -215,14 +229,14 @@
If it is 'dynamic'
, it provides the max
property.
+Defined in src/pools/pool.ts:135
+Defined in src/pools/pool.ts:143
Executes the function specified in the worker constructor with the task data input parameter.
+Executes the specified function in the worker constructor with the task data input parameter.
Parameters
@@ -133,11 +136,15 @@Optional
data: DataThe task input data for the specified worker function. This can only be serializable data.
+
+Optional
name: stringThe name of the worker function to execute. If not specified, the default worker function will be executed.
Returns Promise<Response>
Promise that will be fulfilled when the task is completed.