X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=cda827b9479c3fb3a538dc1ce44d0d9fd0ba40d6;hb=d5d8ef5b0645ff2e43010f981a768c48cd559854;hp=a609d859bfb1757fb5c7beacb7dc657f3182dd43;hpb=6d59ea2c71b8a88d41498c6fb54dfad95fd3a3ac;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index a609d859..cda827b9 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -30,12 +30,12 @@ When the maximum number of threads is reached and workers are busy, an event is
The listener function to execute when a message is received from a worker.
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.
@@ -90,7 +90,6 @@ When the maximum number of threads is reached and workers are busy, an event is execute internal Busy
is Main
-register Worker Message Listener
send To Worker
set Tasks Queue Options
set Worker Choice Strategy
@@ -141,7 +140,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Properties
Protected
Readonly
fileProtected
Readonly
maxProtected
Readonly
numberProtected
Readonly
opts Response Map
-Protected
promiseThe execution response promise map.
key
: The message id of each submitted task. Choice Strategy Context
-Protected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
Nodes
-Readonly
workerPool worker nodes.
Accessors
Protected
full@@ -254,7 +253,7 @@ When the maximum number of threads is reached and workers are busy, an event is
info
@@ -266,7 +265,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Protected
max@@ -278,7 +277,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Protected
min@@ -290,7 +289,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Protected
type@@ -303,7 +302,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Protected
worker@@ -315,7 +314,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Methods
Parameters
worker: ThreadWorkerWithMessageChannel
+worker: Worker
The worker.
message: MessageValue<Response, unknown, Worker | MessagePort>
+message: MessageValue<Response, unknown>
The received message.
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 themain-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.
Parameters
worker: ThreadWorkerWithMessageChannel
+worker: Worker
The newly created worker.
Protected
before@@ -390,46 +389,46 @@ Can be overridden.
Protected
create-- create
And Setup Dynamic Worker(): ThreadWorkerWithMessageChannel
+- create
And Setup Dynamic Worker(): Worker
-
-
Creates a new dynamic worker and sets it up completely in the pool worker nodes.
Returns ThreadWorkerWithMessageChannel
New, completely set up dynamic worker.
+Returns Worker
New, completely set up dynamic worker.
Protected
create-- create
And Setup Worker(): ThreadWorkerWithMessageChannel
+- create
And Setup Worker(): Worker
-
-
Creates a new worker and sets it up completely in the pool worker nodes.
Returns ThreadWorkerWithMessageChannel
New, completely set up worker.
+Returns Worker
New, completely set up worker.
Protected
create-- create
Worker(): ThreadWorkerWithMessageChannel
+- create
Worker(): Worker
-
-
Creates a new worker.
Returns ThreadWorkerWithMessageChannel
Newly created worker.
+Returns Worker
Newly created worker.
destroy
@@ -441,7 +440,7 @@ Can be overridden.
Protected
destroy@@ -453,7 +452,7 @@ Can be overridden.-
-
Parameters
worker: ThreadWorkerWithMessageChannel
+worker: Worker
A worker within
workerNodes
.enable Tasks Queue
@@ -486,7 +485,7 @@ Can be overridden.
execute
@@ -499,7 +498,7 @@ Can be overridden.-
-
@@ -512,7 +511,7 @@ Can be overridden.
+- Defined in src/pools/abstract-pool.ts:417
Busy
+- Defined in src/pools/abstract-pool.ts:408
Main
-
-
+- Defined in src/pools/thread/fixed.ts:57
To Worker
@@ -603,7 +561,7 @@ Can be overridden.
-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.
Protected
internal@@ -525,7 +524,7 @@ Can be overridden.
Protected
is@@ -537,48 +536,7 @@ Can be overridden.
Worker Message Listener
-Protected
register-- register
Worker Message Listener<Message>(worker, listener): void
--
-
-
-
-
-
-
Registers a listener callback on the given worker.
-Type Parameters
---
-
Message
Parameters
---
-
-
--
-
-
-
worker: ThreadWorkerWithMessageChannel
-The worker which should register a listener.
-listener: ((message) => void)
-The message listener callback.
---
-
-- (message): void
--
-
-
-
Parameters
---
-
message: MessageValue<Message, unknown, Worker | MessagePort>
Returns void
Returns void
-Protected
send@@ -590,12 +548,12 @@ Can be overridden.-
-
-
-
Parameters
worker: ThreadWorkerWithMessageChannel
+worker: Worker
The worker which should receive the message.
message: MessageValue<Data, unknown, Worker | MessagePort>
+message: MessageValue<Data, unknown>
The message.
set Tasks Queue Options
@@ -623,7 +581,7 @@ Can be overridden.
set Worker Choice Strategy
@@ -648,7 +606,7 @@ Can be overridden.
set Worker Choice Strategy Options
@@ -668,20 +626,20 @@ Can be overridden.
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.
Returns void
+Protected
worker@@ -702,14 +660,14 @@ Can be overridden-
-
Parameters
message: MessageValue<Response, unknown, Worker | MessagePort>
message: MessageValue<Response, unknown>