X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=019b702cce7e865b7184b663d56d6289c2583dfd;hb=f8350486e75b15ed17249cda3d0a55ee807a6a9f;hp=4b9f97027359c76adcd0f97879a17d9d3ec9693d;hpb=2946f23da560702e3f3631887e1eeb88777bd47d;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index 4b9f9702..019b702c 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -26,9 +26,9 @@ but the minimum number of workers will be guaranteed.
0.0.1
-Constructs a new poolifier thread worker.
Function processed by the worker when the pool's execution
function is invoked.
Task function(s) processed by the worker when the pool's execution
function is invoked.
Protected
Readonly
isProtected
lastProtected
mainProtected
Readonly
optsProtected
taskTask function(s) processed by the worker when the pool's execution
function is invoked.
Binds the given function to execute to this AsyncResource
's scope.
The returned function will have an asyncResource
property referencing
-the AsyncResource
to which the function is bound.
v14.8.0, v12.19.0
AsyncResource
to which the function is bound.
The function to bind to the current AsyncResource
.
Inherited from AbstractWorker.bind
Protected
checkAsyncResource
to which the function is bound.
Inherited from AbstractWorker.checkAlive
AsyncResource
to which the function is bound.
be thrown if it is called more than once. This must be manually called. If
the resource is left to be collected by the GC then the destroy
hooks will
never be called.
-
-A reference to asyncResource
.
A reference to asyncResource
.
Inherited from AbstractWorker.emitDestroy
Protected
getReturns the main worker.
- -Reference to the main worker.
Reference to the main worker.
+Inherited from AbstractWorker.getMainWorker
Protected
handleHandles an error and convert it to a string so it can be sent back to the main worker.
- -Message of the error.
The error raised by the worker.
Message of the error.
+Inherited from AbstractWorker.handleError
Protected
messageWorker message listener.
Message received.
-Function processed by the worker when the pool's execution
function is invoked.
Inherited from AbstractWorker.messageListener
Protected
runRuns the given function synchronously.
-Function that will be executed.
-Input data for the given function.
-Inherited from AbstractWorker.run
-Protected
runFunction that will be executed.
Input data for the given function.
Inherited from AbstractWorker.runAsync
v9.6.0
-Inherited from AbstractWorker.runInAsyncScope
Protected
runRuns the given function synchronously.
+Function that will be executed.
+Input data for the given function.
+Inherited from AbstractWorker.runSync
+Protected
sendThe response message.
Overrides AbstractWorker.sendToMainWorker
The same triggerAsyncId
that is passed to the AsyncResource
constructor.
The same triggerAsyncId
that is passed to the AsyncResource
constructor.
Inherited from AbstractWorker.triggerAsyncId
Static
bindBinds the given function to the current execution context.
-The returned function will have an asyncResource
property referencing
-the AsyncResource
to which the function is bound.
v14.8.0, v12.19.0
AsyncResource
to which the function is bound.
Optional
thisArg: ThisArgInherited from AbstractWorker.bind
Type of data this worker receives from pool's execution. This can only be serializable data.
@@ -44,7 +44,7 @@ but the minimum number of workers will be guaranteed.@@ -61,6 +61,7 @@ but the minimum number of workers will be guaranteed. last Task Timestamp
main Worker
opts
+task Functions