X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicClusterPool.html;h=25c5175756c1fed342a8016e704c7fb9929891ca;hb=c065162cbd0458f984708314dcf5e80c7777077a;hp=afc454110a1456263a093f9170ec3efaa683cbec;hpb=aba8d9bd41f1bd46f3cc3863c0c2e74bdfacb7b6;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index afc45411..25c51757 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,9 @@ When the maximum number of workers is reached and workers are busy, an event is info max Size
min Size
+ready
type
+utilization
worker
Properties
Emitter on which events can be listened to.
Events that can currently be listened to:
-
-
+
+
+
@@ -159,7 +162,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 +257,7 @@ When the maximum number of workers is reached and workers are busy, an event is
info
@@ -266,7 +269,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
max@@ -278,7 +281,7 @@ When the maximum number of workers is reached and workers are busy, an event is
Protected
min@@ -290,7 +293,16 @@ When the maximum number of workers is reached and workers are busy, an event is
+Private
ready+- get ready(): boolean
+-
+
Returns boolean
Protected
type@@ -303,7 +315,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 +340,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.