X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Finterfaces%2FIPool.html;h=12ff8e4a074a5a1d662f5d159dd50f359c4f15ea;hb=ef9f489c870680b9a754ab8e5b142b3f042a9ebb;hp=740e3b8eb00235c2d5f748a35952d59f3e1aafe5;hpb=4f487526a63c873d168386250b40ad8103c5a4d8;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 740e3b8e..12ff8e4a 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.