X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=040d7c3e92338bb3bd24415e99f8a5a44b1bd4a8;hb=a34454964733f585af19a04f21f9e35eb18c77b1;hp=a47e54dd5e226c59fad01bdd98914bc211858940;hpb=248bc34b348a7d8d2b90eecff49d60a3b465da9e;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index a47e54dd..040d7c3e 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,11 +1,13 @@
If you use a DynamicThreadPool
the extra workers that were created will be terminated,
but the minimum number of workers will be guaranteed.
of data this worker receives from pool's execution. This can only be serializable data.
- -of response the worker sends back to the main thread. This can only be serializable data.
-0.0.1
@@ -32,17 +30,21 @@ but the minimum number of workers will be guaranteed.Type of response the worker sends back to the main thread. This can only be serializable data.
+Options for the worker.
Protected
Optional
Readonly
aliveHandler Id of the aliveInterval
worker alive check.
Handler id of the aliveInterval
worker alive check.
Protected
Readonly
isWhether this is the main worker or not.
+Protected
lastTimestamp of the last task processed by this worker.
Protected
mainReadonly
optsProtected
Readonly
optsOptions for the worker.
Inherited from AbstractWorker.opts
+Inherited from AbstractWorker.opts
The unique asyncId
assigned to the resource.
Inherited from AbstractWorker.asyncId
+Inherited from AbstractWorker.asyncId
Binds the given function to execute to this AsyncResource
's scope.
The returned function will have an asyncResource
property referencing
@@ -186,21 +199,21 @@ the AsyncResource
to which the function is bound.
The function to bind to the current AsyncResource
.
Inherited from AbstractWorker.bind
+Inherited from AbstractWorker.bind
Protected
checkCheck to see if the worker should be terminated, because its living too long.
+Checks if the worker should be terminated, because its living too long.
Inherited from AbstractWorker.checkAlive
+Inherited from AbstractWorker.checkAlive
A reference to asyncResource
.
Inherited from AbstractWorker.emitDestroy
+Inherited from AbstractWorker.emitDestroy
Protected
getReference to the main worker.
Inherited from AbstractWorker.getMainWorker
+Inherited from AbstractWorker.getMainWorker
Protected
handleHandle an error and convert it to a string so it can be sent back to the main worker.
+Handles 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.
Inherited from AbstractWorker.handleError
+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
+Inherited from AbstractWorker.messageListener
Protected
runRun the given function synchronously.
+Runs the given function synchronously.
Optional
data: DataInput data for the given function.
Inherited from AbstractWorker.run
+Inherited from AbstractWorker.run
Protected
runRun the given function asynchronously.
+Runs the given function asynchronously.
Optional
data: DataInput data for the given function.
Inherited from AbstractWorker.runAsync
+Inherited from AbstractWorker.runAsync
Optional arguments to pass to the function.
Inherited from AbstractWorker.runInAsyncScope
+Inherited from AbstractWorker.runInAsyncScope
Protected
sendSend a message to the main worker.
-The response message.
-Overrides AbstractWorker.sendToMainWorker
+Overrides AbstractWorker.sendToMainWorker
The same triggerAsyncId
that is passed to the AsyncResource
constructor.
Inherited from AbstractWorker.triggerAsyncId
+Inherited from AbstractWorker.triggerAsyncId
Static
bindBinds the given function to the current execution context.
The returned function will have an asyncResource
property referencing
@@ -455,10 +472,10 @@ the AsyncResource
to which the function is bound.
Optional
thisArg: ThisArgInherited from AbstractWorker.bind
+Inherited from AbstractWorker.bind
Type of data this worker receives from pool's execution. This can only be serializable data.
+