X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=de2edc9d8649f9a8a2c83a1386b686ddedd67699;hb=8d98e603c79d8d00b2b6a33e5f732701a7466234;hp=02db47b5bcc24a322c2626872cee8701ae48f47e;hpb=2946f23da560702e3f3631887e1eeb88777bd47d;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 02db47b5..de2edc9d 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -24,9 +24,9 @@ When the maximum number of threads is reached and workers are busy, an event is
0.0.1
-Protected
workerReadonly
workerProtected
fullWhether the pool is full or not.
The pool filling boolean status.
Private
numberProtected
maxNumber of tasks queued in the pool.
+Pool maximum size.
Private
numberProtected
minNumber of tasks running in the pool.
+Pool minimum size.
Protected
typePool type.
If it is 'dynamic'
, it provides the max
property.
Protected
workerGets the worker type.
+Inherited from FixedThreadPool.worker
+The worker.
The received message.
Inherited from FixedThreadPool.afterTaskExecutionHook
Protected
afterInherited from FixedThreadPool.afterWorkerSetup
Protected
beforeInherited from FixedThreadPool.beforeTaskExecutionHook
Protected
chooseChooses a worker node for the next task.
-The default uses a round robin algorithm to distribute the load.
- -[worker node key, worker node].
+The default worker choice strategy uses a round robin algorithm to distribute the load.
The worker node key
+Inherited from FixedThreadPool.chooseWorkerNode
Protected
createCreates a new worker and sets it up completely in the pool worker nodes.
- -New, completely set up worker.
New, completely set up worker.
+Inherited from FixedThreadPool.createAndSetupWorker
Protected
createInherited from FixedThreadPool.createWorker
Inherited from FixedThreadPool.destroy
Protected
destroyInherited from FixedThreadPool.destroyWorker
Inherited from FixedThreadPool.enableTasksQueue
Executes the function specified in the worker constructor with the task data input parameter.
- -Promise that will be fulfilled when the task is completed.
+Executes the specified function in the worker constructor with the task data input parameter.
Optional
data: DataThe task input data for the specified worker function. This can only be serializable data.
+Optional
name: stringThe name of the worker function to execute. If not specified, the default worker function will be executed.
Promise that will be fulfilled when the task is completed.
+Inherited from FixedThreadPool.execute
Protected
internalInherited from FixedThreadPool.internalBusy
Protected
isInherited from FixedThreadPool.isMain
Protected
registerRegisters a listener callback on the given worker.
Inherited from FixedThreadPool.registerWorkerMessageListener
Protected
sendThe worker which should receive the message.
The message.
Inherited from FixedThreadPool.sendToWorker
Inherited from FixedThreadPool.setTasksQueueOptions
The worker choice strategy.
Inherited from FixedThreadPool.setWorkerChoiceStrategy
Inherited from FixedThreadPool.setWorkerChoiceStrategyOptions
Protected
setupInherited from FixedThreadPool.setupHook
Protected
workerThis function is the listener registered for each worker message.
- -The listener function to execute when a message is received from a worker.
The listener function to execute when a message is received from a worker.
+This function is the listener registered for each worker message.
- -The listener function to execute when a message is received from a worker.
The listener function to execute when a message is received from a worker.
+Inherited from FixedThreadPool.workerListener
Generated using TypeDoc
Type of data sent to the worker. This can only be serializable data.
@@ -42,7 +42,7 @@ When the maximum number of threads is reached and workers are busy, an event is@@ -55,10 +55,10 @@ When the maximum number of threads is reached and workers are busy, an event is
emitter?
-file Path
-max
-number Of Workers
-opts
+file Path
+max
+number Of Workers
+opts
promise Response Map
worker Choice Strategy Context
worker Nodes
@@ -66,10 +66,12 @@ When the maximum number of threads is reached and workers are busy, an event is
busy
-full
-number Of Queued Tasks
-number Of Running Tasks
-type
+full
+info
+max Size
+min Size
+type
+worker
-
-
+
+ - Defined in src/pools/thread/dynamic.ts:27
@@ -142,42 +144,44 @@ When the maximum number of threads is reached and workers are busy, an event is
+
+
-
-- Defined in src/pools/abstract-pool.ts:47
+
+ Path
file Path: string
-
-- Defined in src/pools/abstract-pool.ts:82
+
+
max: number
-
-- Defined in src/pools/thread/dynamic.ts:29
+
+ Of Workers
number Of Workers: number
-
-- Defined in src/pools/abstract-pool.ts:81
+
+
opts: PoolOptions<ThreadWorkerWithMessageChannel>
+- Defined in src/pools/abstract-pool.ts:83
Properties
Accessors
Methods
@@ -102,9 +104,9 @@ When the maximum number of threads is reached and workers are busy, an event isConstructs a new poolifier dynamic thread pool.
Type Parameters
-+-
-
@@ -131,7 +133,7 @@ When the maximum number of threads is reached and workers are busy, an event is
Data = unknown
Returns DynamicThreadPool<Data, Response>
Properties
'full'
: Emitted when the pool is dynamic and full.'busy'
: Emitted when the pool is busy.'error'
: Emitted when an uncaught error occurs.'taskError'
: Emitted when an error occurs while executing a task. Path
+Readonly
fileProtected
Readonly
filePath to the worker file.
+Readonly
maxProtected
Readonly
maxMaximum number of threads that can be created by this pool.
Of Workers
+Readonly
numberProtected
Readonly
numberNumber of workers that this pool should manage.
+Readonly
optsProtected
Readonly
optsOptions for the pool.
Protected
promise