X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=89bbe7e34ef4db8f7065a8f5965b31a287c30a5f;hb=222387cba569774821d225147ac6f35f4f1bc696;hp=5123dcf9cc5262bfe96d29eaf2b599e497e40fda;hpb=15d6dfaf877ec6a99e2bde48cb3c8a9e8671c075;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 5123dcf9..89bbe7e3 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,4 +1,4 @@ -
Generated using TypeDoc
Type of data sent to the worker. This can only be serializable data.
+Type of data sent to the worker. This can only be structured-cloneable data.
Response = unknown
-Type of execution response. This can only be serializable data.
+Type of execution response. This can only be structured-cloneable data.
@@ -67,7 +67,7 @@
-
destroy: (() => Promise<void>)
- (): Promise<void>
-
-
+ - Defined in src/pools/pool.ts:203
emitter?: PoolEmitter
+Defined in src/pools/pool.ts:191
- Tasks Queue
enable Tasks Queue: ((enable, tasksQueueOptions?) => void)
+Defined in src/pools/pool.ts:228
-
execute: ((data?, name?) => Promise<Response>)
-
-
@@ -155,7 +156,7 @@
+ - Defined in src/pools/pool.ts:199
info: PoolInfo
@@ -163,9 +164,9 @@
+Defined in src/pools/pool.ts:175
- Tasks Queue Options
set Tasks Queue Options: ((tasksQueueOptions) => void)
+Defined in src/pools/pool.ts:237
- Worker Choice Strategy
set Worker Choice Strategy: ((workerChoiceStrategy, workerChoiceStrategyOptions?) => void)
-
-
@@ -216,9 +217,9 @@
+Defined in src/pools/pool.ts:210
- Worker Choice Strategy Options
set Worker Choice Strategy Options: ((workerChoiceStrategyOptions) => void)
+Defined in src/pools/pool.ts:219
worker Nodes: WorkerNode<Worker, Data>[]
+worker Nodes: IWorkerNode<Worker, Data>[]
+Defined in src/pools/pool.ts:179
Properties
destroy
+Readonly
destroyType declaration
@@ -76,29 +76,30 @@Shutdowns every current worker in this pool.
+Terminates every current worker in this pool.
Returns Promise<void>
Optional
Readonly
emitterEmitter on which events can be listened to.
Events that can currently be listened to:
-
-
+
+
+
'full'
: Emitted when the pool is dynamic and full.'busy'
: Emitted when the pool is busy.'full'
: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.'ready'
: Emitted when the number of workers created in the pool has reached the minimum size expected and are ready.'busy'
: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing at least one task.'error'
: Emitted when an uncaught error occurs.'taskError'
: Emitted when an error occurs while executing a task.enable Tasks Queue
+Readonly
enableType declaration
@@ -125,9 +126,9 @@Returns void
execute
+Readonly
executeType declaration
@@ -143,7 +144,7 @@
-Optional
data: DataThe task input data for the specified worker function. This can only be serializable data.
+The task input data for the specified worker function. This can only be structured-cloneable data.
Readonly
infoset Tasks Queue Options
+Readonly
setType declaration
@@ -187,9 +188,9 @@Returns void
set Worker Choice Strategy
+Readonly
setType declaration
@@ -204,7 +205,7 @@Parameters
workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"
+workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"
The worker choice strategy.
Returns void
set Worker Choice Strategy Options
+Readonly
setType declaration
@@ -240,15 +241,15 @@Returns void
Nodes
-Readonly
workerPool worker nodes.