X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FDynamicClusterPool.html;h=c0ec5c9fe7ce8aeb529270abc81e7d2303327642;hb=ef9f489c870680b9a754ab8e5b142b3f042a9ebb;hp=c220e4e5fa869366b3d1d485c1465920689a4da7;hpb=6d59ea2c71b8a88d41498c6fb54dfad95fd3a3ac;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index c220e4e5..c0ec5c9f 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -1,4 +1,4 @@ -
Protected
afterFunction that can be hooked up when a worker has been newly created and moved to the pool worker nodes.
-Can be used to update the maxListeners
or binding the main-worker
<->worker
connection if not bind by default.
Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes. +Can be overridden.
Protected
beforeProtected
checkProtected
createProtected
createProtected
createTerminate every current worker in this pool.
+Terminates every current worker in this pool.
Protected
destroyOptional
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.
Protected
internalProtected
isProtected
registerRegisters a listener callback on the given worker.
-The worker which should register a listener.
-The message listener callback.
-Protected
sendThe message.
Protected
setupSetup hook to execute code before worker node are created in the abstract constructor. -Can be overridden
+Setup hook to execute code before worker nodes are created in the abstract constructor. +Can be overridden.
Protected
workerThe listener function to execute when a message is received from a worker.
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.
@@ -73,7 +73,10 @@ When the maximum number of workers is reached and workers are busy, an event is info max Size
min Size
+ready
+starting
type
+utilization
worker
Properties
Emitter on which events can be listened to.
Events that can currently be listened to:
-
-
+
+
+
@@ -159,7 +163,7 @@ When the maximum number of workers is reached and workers are busy, an event is +'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.Protected
Readonly
fileProtected
Readonly
maxProtected
Readonly
numberProtected
Readonly
optsProtected
promiseProtected
worker Nodes
-Readonly
workerPool worker nodes.
Accessors
Protected
full@@ -254,7 +258,7 @@ When the maximum number of workers is reached and workers are busy, an event is
info
@@ -266,7 +270,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
max@@ -278,7 +282,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
min@@ -290,7 +294,25 @@ When the maximum number of workers is reached and workers are busy, an event is
+Private
ready+- get ready(): boolean
+-
+
Returns boolean
+Private
starting+- get starting(): boolean
+-
+
Returns boolean
Protected
type@@ -303,7 +325,20 @@ When the maximum number of workers is reached and workers are busy, an event is
+Private
utilization+- get utilization(): number
+-
+
+
Gets the approximate pool utilization.
+Returns number
The pool utilization.
+ +Protected
worker@@ -315,7 +350,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Methods
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
The received message.