X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=inline;f=docs%2Finterfaces%2FIWorkerNode.html;h=6b4b5265d81022dd91adb48fb7d054fe6ee156a2;hb=b4e93467358d93166716dc6e5075d58c18c961c7;hp=b96935224c15b701f8262ecaa74e2ae0b541d014;hpb=078116c1d8dde66831fcf40973059818592c8a88;p=poolifier.git diff --git a/docs/interfaces/IWorkerNode.html b/docs/interfaces/IWorkerNode.html index b9693522..6b4b5265 100644 --- a/docs/interfaces/IWorkerNode.html +++ b/docs/interfaces/IWorkerNode.html @@ -1,7 +1,7 @@ -
Internal
Worker node interface.
+- Preparing search index...
- The search index is not available
poolifier - v3.0.6Interface IWorkerNode<Worker, Data>
Internal
Worker node interface.
Type Parameters
Worker extends IWorker
Type of worker.
Data = unknown
Type of data sent to the worker. This can only be structured-cloneable data.
-Hierarchy
Index
Properties
Hierarchy
Index
Properties
Properties
Readonly
clearType declaration
Clears tasks queue.
-Returns void
Readonly
closeType declaration
Closes communication channel.
-Returns void
Readonly
deleteType declaration
Deletes task function worker usage statistics.
+Returns void
Readonly
closeType declaration
Closes communication channel.
+Returns void
Readonly
deleteType declaration
Deletes task function worker usage statistics.
Parameters
name: string
The task function name.
Returns boolean
-true
if the task function worker usage statistics were deleted,false
otherwise.Readonly
dequeueType declaration
Dequeue task.
+Readonly
dequeueType declaration
Dequeue task.
Returns undefined | Task<Data>
The dequeued task.
-Readonly
enqueueType declaration
Enqueue task.
+Readonly
enqueueType declaration
Enqueue task.
Parameters
task: Task<Data>
The task to queue.
Returns number
The tasks queue size.
-Readonly
getType declaration
Gets task function worker usage statistics.
+Readonly
getType declaration
Gets task function worker usage statistics.
Parameters
name: string
The task function name.
Returns undefined | WorkerUsage
The task function worker usage statistics if the task function worker usage statistics are initialized,
-undefined
otherwise.Readonly
hasType declaration
Whether the worker node has back pressure (i.e. its tasks queue is full).
+Readonly
hasType declaration
Whether the worker node has back pressure (i.e. its tasks queue is full).
Returns boolean
-true
if the worker node has back pressure,false
otherwise.Readonly
infoWorker info.
-Optional
Readonly
messageMessage channel (worker_threads only).
-Readonly
popType declaration
Pops a task from the tasks queue.
+Readonly
infoWorker info.
+Optional
Readonly
messageMessage channel (worker_threads only).
+Readonly
popType declaration
Pops a task from the tasks queue.
Returns undefined | Task<Data>
The popped task.
-Readonly
resetType declaration
Resets usage statistics.
-Returns void
Optional
strategyWorker choice strategy data. +
Readonly
resetType declaration
Resets usage statistics.
+Returns void
Optional
strategyWorker choice strategy data. This is used to store data that are specific to the worker choice strategy.
-tasks Queue Back Pressure Size
Tasks queue back pressure size. +
tasks Queue Back Pressure Size
Tasks queue back pressure size. This is the number of tasks that can be enqueued before the worker node has back pressure.
-Readonly
tasksType declaration
Tasks queue size.
+Readonly
tasksType declaration
Tasks queue size.
Returns number
The tasks queue size.
-Readonly
unshiftType declaration
Prepends a task to the tasks queue.
+Readonly
unshiftType declaration
Prepends a task to the tasks queue.
Parameters
task: Task<Data>
The task to prepend.
Returns number
The tasks queue size.
-Readonly
usageWorker usage statistics.
-Readonly
workerWorker.
-Methods
add Event Listener
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
+Readonly
usageWorker usage statistics.
+Readonly
workerWorker.
+Methods
add Event Listener
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched.
The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture.
When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET.
When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in § 2.8 Observing event listeners.
@@ -60,8 +60,8 @@ This is the number of tasks that can be enqueued before the worker node has backIf an AbortSignal is passed for options's signal, then the event listener will be removed when signal is aborted.
The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
MDN Reference
-Parameters
type: string
callback: null | EventListenerOrEventListenerObject
Optional
options: boolean | AddEventListenerOptionsReturns void
dispatch Event
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
+Parameters
type: string
callback: null | EventListenerOrEventListenerObject
Optional
options: boolean | AddEventListenerOptionsReturns void
dispatch Event
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
MDN Reference
-Parameters
event: Event
Returns boolean
remove Event Listener
Removes the event listener in target's event listener list with the same type, callback, and options.
+Parameters
event: Event
Returns boolean
remove Event Listener
Removes the event listener in target's event listener list with the same type, callback, and options.
MDN Reference
-Parameters
type: string
callback: null | EventListenerOrEventListenerObject
Optional
options: boolean | EventListenerOptionsReturns void
Settings
Member Visibility
Theme
On This Page
Generated using TypeDoc
Parameters
type: string
callback: null | EventListenerOrEventListenerObject
Optional
options: boolean | EventListenerOptionsReturns void
Settings
Member Visibility
Theme
On This Page
Generated using TypeDoc