X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=75415733c11ac7dd30a0e691c695148dea229af0;hb=a34454964733f585af19a04f21f9e35eb18c77b1;hp=c69bd404d03c330954365ddcc7e0be5b00c71f2f;hpb=c0b0686de0f8c5483b20b94fac97d2b8175c0556;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index c69bd404..75415733 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,11 +1,13 @@
It is possible to perform tasks in sync or asynchronous mode as you prefer.
This pool selects the threads in a round robin fashion.
-of data sent to the worker. This can only be serializable data.
- -of response of execution. This can only be serializable data.
-0.0.1
@@ -30,9 +28,13 @@Type of response of execution. This can only be serializable data.
+Constructs a new poolifier fixed thread pool.
Path to an implementation of a ThreadWorker
file, which can be relative or absolute.
Optional
opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}Options for this fixed thread pool.
Optional
Readonly
emitterReadonly
fileOptional
Readonly
maxProtected
nextId of the next message.
+Path to the worker-file.
Readonly
numberReadonly
optsOptions for the pool.
+Inherited from AbstractPool.opts
Protected
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.
Inherited from AbstractPool.promiseMap
+Inherited from AbstractPool.promiseResponseMap
Readonly
tasksInherited from AbstractPool.tasks
-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.
Inherited from AbstractPool.workerChoiceStrategyContext
Readonly
workersReadonly
workerInherited from AbstractPool.workers
+Inherited from AbstractPool.workerNodes
Overrides AbstractPool.busy
Overrides AbstractPool.full
+Private
numberNumber of tasks queued in the pool.
+Inherited from AbstractPool.numberOfQueuedTasks
+Private
numberNumber of tasks running in the pool.
+Inherited from AbstractPool.numberOfRunningTasks
Overrides AbstractPool.type
Protected
afterHook executed after the worker task promise resolution. +Can be overridden.
+The worker.
+The received message.
+Inherited from AbstractPool.afterPromiseResponseHook
+Protected
afterOverrides AbstractPool.afterWorkerSetup
Protected
chooseProtected
beforeHook executed before the worker task promise resolution. +Can be overridden.
+The worker node key.
+Inherited from AbstractPool.beforePromiseResponseHook
+Protected
chooseChoose a worker for the next task.
-The default implementation uses a round robin algorithm to distribute the load.
+Chooses a worker node for the next task.
+The default uses a round robin algorithm to distribute the load.
-Worker.
+[worker node key, worker node].
Inherited from AbstractPool.chooseWorker
+Inherited from AbstractPool.chooseWorkerNode
Protected
createCreates a new worker for this pool and sets it up completely.
+Creates a new worker and sets it up completely in the pool worker nodes.
New, completely set up worker.
Inherited from AbstractPool.createAndSetupWorker
Protected
createOverrides AbstractPool.createWorker
Protected
decreaseProtected
dequeueDecrease the number of tasks that the given worker has applied.
-Worker whose tasks are decreased.
-Inherited from AbstractPool.decreaseWorkersTasks
+Inherited from AbstractPool.dequeueTask
Inherited from AbstractPool.destroy
Overrides AbstractPool.destroyWorker
Protected
enqueueInherited from AbstractPool.enqueueTask
+Inherited from AbstractPool.execute
Inherited from AbstractPool.findFreeWorker
-Inherited from AbstractPool.getWorkerIndex
+Inherited from AbstractPool.findFreeWorkerNodeKey
Inherited from AbstractPool.getWorkerRunningTasks
-Protected
increaseProtected
flushIncrease the number of tasks that the given worker has applied.
-Worker whose tasks are increased.
-Inherited from AbstractPool.increaseWorkersTask
+Inherited from AbstractPool.flushTasksQueue
Protected
internalProtected
flushInherited from AbstractPool.internalExecute
+Inherited from AbstractPool.flushTasksQueueByWorker
Protected
internalProtected
internalInherited from AbstractPool.internalGetBusyStatus
+Inherited from AbstractPool.internalBusy
Protected
isOverrides AbstractPool.isMain
Overrides AbstractPool.registerWorkerMessageListener
Protected
removeProtected
removeRemoves the given worker from the pool.
+Removes the given worker from the pool worker nodes.
Worker that will be removed.
+The worker.
Inherited from AbstractPool.removeWorker
+Inherited from AbstractPool.removeWorkerNode
Protected
sendOverrides AbstractPool.sendToWorker
Inherited from AbstractPool.setWorkerChoiceStrategy
Protected
setupSetup hook that can be overridden by a Poolifier pool implementation -to run code before workers are created in the abstract constructor.
+Setup hook to run code before worker node are created in the abstract constructor. +Can be overridden
Inherited from AbstractPool.setupHook
Protected
tasksInherited from AbstractPool.tasksQueueLength
+Protected
workerThis function is the listener registered for each worker.
+This function is the listener registered for each worker message.
The listener function to execute when a message is received from a worker.
This function is the listener registered for each worker.
+This function is the listener registered for each worker message.
The listener function to execute when a message is received from a worker.
Inherited from AbstractPool.workerListener
Generated using TypeDoc
Type of data sent to the worker. This can only be serializable data.
+