X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=9839ac139b1984a50c829efd4060c78d7cf895c8;hb=afc003b20097712625ffd053e256ef5336e27b6e;hp=8e381bd07b203c21ce9a92f44b61570f7cabfa08;hpb=f06d10306cf1bfffb90048cf6e96c8507cd0e916;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 8e381bd0..9839ac13 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -18,7 +18,7 @@
Readonly
optsProtected
promiseThe promise map.
+Protected
promiseThe promise response map.
key
: This is the message Id of each submitted task.value
: An object that contains the worker, the resolve function and the reject function.key
: The message id of each submitted task.value
: An object that contains the worker, the promise resolve and reject callbacks.When we receive a message from the worker we get a map entry and resolve/reject the promise based on the message.
+When we receive a message from the worker we get a map entry with the promise resolve/reject bound to the message.
Protected
workerWorker choice strategy instance implementing the worker choice algorithm.
-Default to a strategy implementing a round robin algorithm.
+Worker choice strategy context referencing a worker choice algorithm implementation.
+Default to a round robin algorithm.
Readonly
workers{@inheritDoc}
Readonly
workers{@inheritDoc}
-{@inheritDoc}
Private
numberNumber of tasks concurrently running in the pool.
+Protected
afterProtected
afterHook executed after the worker task promise resolution. Can be overridden.
@@ -270,17 +261,17 @@ Can be overridden.The received message.
+The worker.
The Promise response.
+The received message.
Protected
afterProtected
beforeProtected
beforeHook executed before the worker task promise resolution. Can be overridden.
@@ -309,27 +300,27 @@ Can be overridden.The worker.
+The worker key.
Protected
chooseChooses a worker for the next task.
-The default implementation uses a round robin algorithm to distribute the load.
+The default uses a round robin algorithm to distribute the load.
-Worker.
+[worker key, worker].
Protected
createInherited from FixedThreadPool.createAndSetupWorker
Protected
createInherited from FixedThreadPool.createWorker
Inherited from FixedThreadPool.destroy
Inherited from FixedThreadPool.destroyWorker
Inherited from FixedThreadPool.execute
{@inheritDoc}
-Inherited from FixedThreadPool.findFreeWorker
-{@inheritDoc}
Inherited from FixedThreadPool.getWorkerAverageTasksRunTime
-{@inheritDoc}
-Inherited from FixedThreadPool.getWorkerIndex
-{@inheritDoc}
-Inherited from FixedThreadPool.getWorkerRunningTasks
+Inherited from FixedThreadPool.findFreeWorkerKey
Protected
internalProtected
internalInherited from FixedThreadPool.internalGetBusyStatus
+Inherited from FixedThreadPool.internalBusy
Protected
isInherited from FixedThreadPool.isMain
Inherited from FixedThreadPool.registerWorkerMessageListener
Protected
removeInherited from FixedThreadPool.removeWorker
Protected
sendInherited from FixedThreadPool.sendToWorker
{@inheritDoc}
Inherited from FixedThreadPool.setWorkerChoiceStrategy
Protected
setupInherited from FixedThreadPool.setupHook
Protected
workerInherited from FixedThreadPool.workerListener
A thread pool with a dynamic number of threads, but a guaranteed minimum number of threads.
This thread pool creates new threads when the others are busy, up to the maximum number of threads. -When the maximum number of threads is reached, an event is emitted. If you want to listen to this event, use the pool's
+When the maximum number of threads is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool'semitter
.emitter
.Author
Alessandro Pio Ardizio
@@ -42,7 +42,7 @@ When the maximum number of threads is reached, an event is emitted. If you want@@ -56,37 +56,33 @@ When the maximum number of threads is reached, an event is emitted. If you wantemitter?
file Path
-max
-next Message Id
+max
number Of Workers
opts
-promise Map
+promise Response Map
worker Choice Strategy Context
workers
-workers Tasks Usage
Properties
Accessors
Methods
-Returns DynamicThreadPool<Data, Response>
+Properties
Readonly
file
+Protected
Readonly
maxPrivate
Readonly
maxMaximum number of threads that can be created by this pool.
Message Id
-Protected
nextId of the next message.
-Readonly
number