X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=d75d6e125a09b74fe6b8fe9d45edf48b758f5750;hb=b7076c9f9bff47cc233fb67df43ae160680c6d6e;hp=9df69d2108ba6c1ba7dab4844c36cdab5bebefb8;hpb=8662ea71e523af81c1138618f0e12b89df35ce8a;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 9df69d21..d75d6e12 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,27 +206,27 @@ 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
checkChecks if the fn
parameter is passed to the constructor.
AsyncResource
to which the function is bound.
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,22 +276,22 @@ 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
runRuns the given function synchronously.
Function that will be executed.
Optional
data: DataOptional
data: DataInput data for the given function.
Protected
runRuns 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,38 +430,38 @@ 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
sendSends 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.