X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Finterfaces%2FIPool.html;h=98a3dbfbeb4b07937ae4b88c9a004e3558eeb830;hb=5e972953bf3193a557a14fa794d559b2acc1d6de;hp=7a5959976b8611044d87fe024cdeb1cf1ef0288c;hpb=f45a3823ad04902b4c446c7c7de55ca183041953;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 7a595997..98a3dbfb 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.