X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FClusterWorker.html;h=b57fe944d39edebcb7b6a4b764b2b67f70763929;hb=a13e50c30dd0e0714ace0e1ea4ea1b36cdd18ab7;hp=752da24bdd503c0e9ac835b15173db88cacf570a;hpb=d5d8ef5b0645ff2e43010f981a768c48cd559854;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index 752da24b..b57fe944 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -1,4 +1,4 @@ -
Protected
Optional
Readonly
aliveHandler id of the aliveInterval
worker alive check.
Protected
Optional
activeHandler id of the activeInterval
worker activity check.
Protected
Readonly
isProtected
lastProtected
Readonly
mainReference to main worker.
-Protected
Readonly
optsProtected
statisticsProtected
taskTask function(s) processed by the worker when the pool's execution
function is invoked.
Protected
idWorker id.
+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.
+ +https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the default task function reserved name.
https://nodejs.org/api/errors.html#class-typeerror If the fn
parameter is not a function.
Protected
checkProtected
getProtected
handleProtected
handleHandles a kill message sent by the main worker.
+The kill message.
+Protected
handleHandles the ready message sent by the main worker.
+The ready message.
+Checks if the worker has a task function with the given name.
+The name of the task function to check.
+Whether the worker has a task function with the given name or not.
+ +https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
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.
+ +https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the default task function reserved name.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the task function used as default task function.
Protected
runRuns the given task.
+The task to execute.
+https://nodejs.org/api/errors.html#class-error If the task function is not found.
+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
sendSends a message to the main worker.
+Sends a message to main worker.
Sets 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.
+ +https://nodejs.org/api/errors.html#class-typeerror If the name
parameter is not a string.
https://nodejs.org/api/errors.html#class-error If the name
parameter is the default task function reserved name.
https://nodejs.org/api/errors.html#class-error If the name
parameter is a non-existing task function.
Static
bindGenerated using TypeDoc
Task function(s) processed by the worker when the pool's
execution
function is invoked.