X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Fclasses%2FAbstractWorker.html;h=83823ef34f77b0afa3518d50743409132d3fdc02;hb=1639315e9fcda007015bad70bd480f7c8cd68669;hp=9d35f34f0a679a273c15a035d0c8512977cd4101;hpb=47c9cec4c0a1a871153e1811ec6d95c90d2c86d1;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 9d35f34f..83823ef3 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -
Task function(s) processed by the worker when the pool's execution
function is invoked. The first function is the default function.
Reference to main worker.
Reference to main worker.
+Task function(s) processed by the worker when the pool's execution
function is invoked. The first function is the default function.
Options for the worker.
Protected
Optional
aliveHandler id of the aliveInterval
worker alive check.
Protected
Optional
activeHandler id of the activeInterval
worker activity check.
Protected
Abstract
idProtected
Readonly
isProtected
lastProtected
Readonly
mainPrivate
Readonly
mainReference to main worker.
Protected
Readonly
optsProtected
optsOptions for the worker.
Protected
statisticsProtected
taskTask function(s) processed by the worker when the pool's execution
function is invoked.
Adds a task function to the worker. +If a task function with the same name already exists, it is replaced.
+The name of the task function to add.
+The task function to add.
+Whether the task function was added or not.
+ +Private
beginOptional
name: stringPrivate
checkPrivate
checkPrivate
checkCheck if the message worker id is set and matches the worker id.
+The message to check.
+https://nodejs.org/api/errors.html#class-error If the message worker id is not set or does not match the worker id.
+Private
checkPrivate
checkChecks if the taskFunctions
parameter is passed to the constructor.
Checks if the taskFunctions
parameter is passed to the constructor and valid.
The task function(s) parameter that should be checked.
Private
checkPrivate
endProtected
getReference to the main worker.
+https://nodejs.org/api/errors.html#class-error If the main worker is not set.
+Protected
handlePrivate
getProtected
handleGets the task function in the given scope.
+Handles a kill message sent by the main worker.
Optional
name: stringName of the function that will be returned.
+Protected
Abstract
handleHandles the ready message sent by the main worker.
+The ready message.
Protected
handleProtected
handleHandles an error and convert it to a string so it can be sent back to the main worker.
+Checks if the worker has a task function with the given name.
The error raised by the worker.
+The name of the task function to check.
The error message.
+Whether the worker has a task function with the given name or not.
Protected
messageRemoves a task function from the worker.
+The name of the task function to remove.
+Whether the task function existed and was removed or not.
+ +Protected
runRuns the given task.
+The task to execute.
Protected
runRuns the given function asynchronously.
+Runs the given task function asynchronously.
Function that will be executed.
+Task function that will be executed.
Protected
runRuns the given function synchronously.
+Runs the given task function synchronously.
Function that will be executed.
+Task function that will be executed.
Protected
sendProtected
Abstract
sendSends a message to the main worker.
+Sends a message to main worker.
Private
startSets the default task function to use in the worker.
+The name of the task function to use as default task function.
+Whether the default task function was set or not.
+ +Private
startStarts the worker alive check interval.
+Starts the worker check active interval.
Private
stopPrivate
stopStops the worker alive check interval.
+Stops the worker check active interval.
Protected
workerPrivate
updateStatic
bindInherited from AsyncResource.bind
Generated using TypeDoc
Generated using TypeDoc
Constructs a new poolifier worker.