X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=89bbe7e34ef4db8f7065a8f5965b31a287c30a5f;hb=222387cba569774821d225147ac6f35f4f1bc696;hp=9207f5005de2714305243506df84e80215bc7963;hpb=aba8d9bd41f1bd46f3cc3863c0c2e74bdfacb7b6;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 9207f500..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)
+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 @@Terminate 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
@@ -216,9 +217,9 @@Returns void
set Worker Choice Strategy Options
+Readonly
setType declaration
@@ -240,15 +241,15 @@Returns void
Nodes
-Readonly
workerPool worker nodes.