X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Fclasses%2FAbstractWorker.html;h=4717da904f6535def4e939a4f809d7c9ef38ad0f;hb=027063571693f211b35c8851566a063201adb9af;hp=c048f6f6d26cf39f0563493cec0eeffa622a122d;hpb=7e2a464b15953320c79646e2ff88d953db4e5b96;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index c048f6f6..4717da90 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,15 @@ -
Whether this is the main worker or not.
Function processed by the worker when the pool's execution
function is invoked.
Reference to main worker.
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
mainReference to main worker.
+Readonly
optsProtected
Readonly
optsOptions for the worker.
Inherited from AsyncResource.asyncId
Binds the given function to execute to this AsyncResource
's scope.
The returned function will have an asyncResource
property referencing
@@ -194,51 +206,51 @@ the AsyncResource
to which the function is bound.
The function to bind to the current AsyncResource
.
Inherited from AsyncResource.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.
Private
checkCheck if the fn
parameter is passed to the constructor.
Checks if the fn
parameter is passed to the constructor.
The function that should be defined.
Private
checkAsyncResource
to which the function is bound.
Call all destroy
hooks. This should only ever be called once. An error will
be thrown if it is called more than once. This must be manually called. If
@@ -264,28 +276,28 @@ never be called.
A reference to asyncResource
.
Inherited from AsyncResource.emitDestroy
Protected
getReturns the main worker.
Reference to the main worker.
Protected
handleProtected
messageWorker message listener.
+Message received.
+Function processed by the worker when the pool's execution
function is invoked.
Protected
runRun the given function synchronously.
+Runs the given function synchronously.
Function that will be executed.
Optional
data: DataOptional
data: DataInput data for the given function.
Protected
runRun the given function asynchronously.
+Runs the given function asynchronously.
Function that will be executed.
Optional
data: DataOptional
data: DataInput data for the given function.
Call the provided function with the provided arguments in the execution context of the async resource. This will establish the context, trigger the AsyncHooks @@ -412,51 +430,51 @@ then restore the original execution context.
The function to call in the execution context of this async resource.
Rest
...args: any[]Optional
thisArg: ThisOptional
thisArg: ThisThe receiver to be used for the function call.
Rest
...args: any[]Optional arguments to pass to the function.
Inherited from AsyncResource.runInAsyncScope
Protected
Abstract
sendSend a message to the main worker.
+Sends a message to the main worker.
The response message.
Inherited from AsyncResource.triggerAsyncId
Static
bindBinds the given function to the current execution context.
The returned function will have an asyncResource
property referencing
@@ -484,14 +502,14 @@ the AsyncResource
to which the function is bound.
The function to bind to the current execution context.
AsyncResource
to which the function is bound.
An optional name to associate with the underlying AsyncResource
.
Optional
thisArg: ThisArgOptional
thisArg: ThisArgInherited from AsyncResource.bind
Generated using TypeDoc
Constructs a new poolifier worker.