X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FFixedThreadPool.html;h=bdaa69dea6dba275b12ef200989632f54459b47b;hb=ba92b02f642f229cb927ab526148f10107831471;hp=f49b2039eedc493d0f921e005b1f62a95a5b7611;hpb=fe9f25b5ac98c7c7fccd1849a200c5054a77cf03;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index f49b2039..bdaa69de 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
fileInherited from AbstractPool.filePath
-Optional
Readonly
maxInherited from AbstractPool.max
-Protected
nextId of the next message.
+Path to the worker-file.
Inherited from AbstractPool.nextMessageId
+Inherited from AbstractPool.filePath
Readonly
numberNumber of workers that this pool should manage.
+Inherited from AbstractPool.numberOfWorkers
Readonly
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
workerInherited from AbstractPool.workerChoiceStrategyContext
Readonly
workers{@inheritDoc}
+Inherited from AbstractPool.workers
{@inheritDoc}
+Overrides AbstractPool.busy
{@inheritDoc}
+Overrides AbstractPool.full
+Private
numberNumber of tasks concurrently running.
+Inherited from AbstractPool.numberOfRunningTasks
{@inheritDoc}
+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
after{@inheritDoc}
+Overrides AbstractPool.afterWorkerSetup
Protected
beforeHook executed before the worker task promise resolution. +Can be overridden.
+The worker key.
+Inherited from AbstractPool.beforePromiseResponseHook
+Protected
chooseChoose a worker for the next task.
+Chooses a worker for the next task.
The default implementation uses a round robin algorithm to distribute the load.
-Worker.
+[worker key, worker].
Inherited from AbstractPool.chooseWorker
Protected
createInherited from AbstractPool.createAndSetupWorker
Protected
create{@inheritDoc}
+Overrides AbstractPool.createWorker
Protected
decreaseDecrease the number of tasks that the given worker has applied.
-Worker whose tasks are decreased.
-Inherited from AbstractPool.decreaseWorkersTasks
-{@inheritDoc}
+Inherited from AbstractPool.destroy
{@inheritDoc}
+Overrides AbstractPool.destroyWorker
{@inheritDoc}
+Inherited from AbstractPool.execute
Inherited from AbstractPool.findFreeWorker
-Inherited from AbstractPool.getWorkerIndex
-Inherited from AbstractPool.getWorkerRunningTasks
-Protected
increaseIncrease the number of tasks that the given worker has applied.
+{@inheritDoc}
Worker whose tasks are increased.
-Inherited from AbstractPool.increaseWorkersTask
-Protected
internalInherited from AbstractPool.internalExecute
+Inherited from AbstractPool.findFreeWorkerKey
Protected
internalProtected
internalInherited from AbstractPool.internalGetBusyStatus
+Inherited from AbstractPool.internalBusy
Protected
is{@inheritDoc}
+Overrides AbstractPool.isMain
{@inheritDoc}
+Overrides AbstractPool.registerWorkerMessageListener
Protected
removeWorker that will be removed.
+The worker that will be removed.
Inherited from AbstractPool.removeWorker
Protected
send{@inheritDoc}
+Overrides AbstractPool.sendToWorker
{@inheritDoc}
+Inherited from AbstractPool.setWorkerChoiceStrategy
Protected
setupInherited from AbstractPool.setupHook
Protected
workerInherited from AbstractPool.workerListener
Type of data sent to the worker. This can only be serializable data.
+