From ec06e4dd01adf7aa4bab470c59da42c19d863d0b Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Tue, 11 Apr 2023 19:42:35 +0000
Subject: [PATCH] chore: generate documentation
---
docs/assets/main.js | 6 +-
docs/assets/search.js | 2 +-
docs/assets/style.css | 448 ++++++++----------
docs/classes/ClusterWorker.html | 204 ++++----
docs/classes/DynamicClusterPool.html | 222 +++++----
docs/classes/DynamicThreadPool.html | 222 +++++----
docs/classes/FixedClusterPool.html | 218 +++++----
docs/classes/FixedThreadPool.html | 218 +++++----
docs/classes/PoolEmitter.html | 102 ++--
docs/classes/ThreadWorker.html | 204 ++++----
docs/index.html | 73 ++-
docs/interfaces/ClusterPoolOptions.html | 104 ++--
docs/interfaces/IPool.html | 76 +--
docs/interfaces/PoolOptions.html | 105 ++--
.../WorkerChoiceStrategyOptions.html | 56 ++-
docs/interfaces/WorkerOptions.html | 64 ++-
docs/types/ErrorHandler.html | 83 ++--
docs/types/ExitHandler.html | 83 ++--
docs/types/KillBehavior.html | 75 ++-
docs/types/MessageHandler.html | 83 ++--
docs/types/OnlineHandler.html | 83 ++--
docs/types/PoolEvent.html | 75 ++-
.../types/ThreadWorkerWithMessageChannel.html | 75 ++-
docs/types/WorkerChoiceStrategy.html | 75 ++-
docs/variables/KillBehaviors.html | 75 ++-
docs/variables/PoolEvents.html | 75 ++-
docs/variables/WorkerChoiceStrategies.html | 75 ++-
27 files changed, 1656 insertions(+), 1525 deletions(-)
diff --git a/docs/assets/main.js b/docs/assets/main.js
index f7c83669..d9b2d0a6 100644
--- a/docs/assets/main.js
+++ b/docs/assets/main.js
@@ -1,7 +1,7 @@
"use strict";
-"use strict";(()=>{var Qe=Object.create;var ae=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Ce=Object.getOwnPropertyNames;var Oe=Object.getPrototypeOf,Re=Object.prototype.hasOwnProperty;var _e=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Me=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ce(e))!Re.call(t,i)&&i!==n&&ae(t,i,{get:()=>e[i],enumerable:!(r=Pe(e,i))||r.enumerable});return t};var De=(t,e,n)=>(n=t!=null?Qe(Oe(t)):{},Me(e||!t||!t.__esModule?ae(n,"default",{value:t,enumerable:!0}):n,t));var de=_e((ce,he)=>{(function(){var t=function(e){var n=new t.Builder;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),n.searchPipeline.add(t.stemmer),e.call(n,n),n.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(n){e.console&&console.warn&&console.warn(n)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var n=Object.create(null),r=Object.keys(e),i=0;i Function processed by the worker when the pool's Options for the worker. Inherited from AbstractWorker.aliveInterval Inherited from AbstractWorker.isMain=e;n--){var r=this.uncheckedNodes[n],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(n){var r=new t.QueryParser(e,n);r.parse()})},t.Index.prototype.query=function(e){for(var n=new t.Query(this.fields),r=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u{let n=Date.now();return(...r)=>{n+e-Date.now()<0&&(t(...r),n=Date.now())}};var re=class extends J{constructor(){super();this.scrollTop=0;this.lastY=0;this.width=0;this.height=0;this.showToolbar=!0;this.toolbar=document.querySelector(".tsd-page-toolbar"),this.navigation=document.querySelector(".col-menu"),window.addEventListener("scroll",ne(()=>this.onScroll(),10)),window.addEventListener("resize",ne(()=>this.onResize(),10)),this.searchInput=document.querySelector("#tsd-search input"),this.searchInput&&this.searchInput.addEventListener("focus",()=>{this.hideShowToolbar()}),this.onResize(),this.onScroll()}triggerResize(){let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onResize(){this.width=window.innerWidth||0,this.height=window.innerHeight||0;let n=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(n)}onScroll(){this.scrollTop=window.scrollY||0;let n=new CustomEvent("scroll",{detail:{scrollTop:this.scrollTop}});this.dispatchEvent(n),this.hideShowToolbar()}hideShowToolbar(){let n=this.showToolbar;this.showToolbar=this.lastY>=this.scrollTop||this.scrollTop<=0||!!this.searchInput&&this.searchInput===document.activeElement,n!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),this.navigation?.classList.toggle("col-menu--hide")),this.lastY=this.scrollTop}},R=re;R.instance=new re;var X=class extends I{constructor(n){super(n);this.anchors=[];this.index=-1;R.instance.addEventListener("resize",()=>this.onResize()),R.instance.addEventListener("scroll",r=>this.onScroll(r)),this.createAnchors()}createAnchors(){let n=window.location.href;n.indexOf("#")!=-1&&(n=n.substring(0,n.indexOf("#"))),this.el.querySelectorAll("a").forEach(r=>{let i=r.href;if(i.indexOf("#")==-1||i.substring(0,n.length)!=n)return;let s=i.substring(i.indexOf("#")+1),o=document.querySelector("a.tsd-anchor[name="+s+"]"),a=r.parentNode;!o||!a||this.anchors.push({link:a,anchor:o,position:0})}),this.onResize()}onResize(){let n;for(let i=0,s=this.anchors.length;ii.position-s.position);let r=new CustomEvent("scroll",{detail:{scrollTop:R.instance.scrollTop}});this.onScroll(r)}onScroll(n){let r=n.detail.scrollTop+5,i=this.anchors,s=i.length-1,o=this.index;for(;o>-1&&i[o].position>r;)o-=1;for(;o-1&&this.anchors[this.index].link.classList.remove("focus"),this.index=o,this.index>-1&&this.anchors[this.index].link.classList.add("focus"))}};var ue=(t,e=100)=>{let n;return()=>{clearTimeout(n),n=setTimeout(()=>t(),e)}};var me=De(de());function ve(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let n=document.querySelector("#tsd-search input"),r=document.querySelector("#tsd-search .results");if(!n||!r)throw new Error("The input field or the result list wrapper was not found");let i=!1;r.addEventListener("mousedown",()=>i=!0),r.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),n.addEventListener("focus",()=>t.classList.add("has-focus")),n.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Fe(t,r,n,s)}function Fe(t,e,n,r){n.addEventListener("input",ue(()=>{He(t,e,n,r)},200));let i=!1;n.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?Ve(e,n):s.key=="Escape"?n.blur():s.key=="ArrowUp"?pe(e,-1):s.key==="ArrowDown"?pe(e,1):i=!1}),n.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!n.matches(":focus")&&s.key==="/"&&(n.focus(),s.preventDefault())})}function Ae(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=me.Index.load(window.searchData.index))}function He(t,e,n,r){if(Ae(r,t),!r.index||!r.data)return;e.textContent="";let i=n.value.trim(),s=i?r.index.search(`*${i}*`):[];for(let o=0;o=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),l=0;l
@@ -83,7 +83,7 @@ but the minimum number of workers will be guaranteed.
constructor
-
Parameters
fn: ((data: Data) => Response)
+fn: ((data: Data) => Response)
execution
function is invoked.
-
Parameters
data: Data
Returns Response
data: Data
Returns Response
opts: WorkerOptions = {}
Returns ClusterWorker<Data, Response>
Properties
-
Protected
Readonly
is
-
Protected
last
Inherited from AbstractWorker.lastTaskTimestamp
Protected
mainInherited from AbstractWorker.mainWorker
Protected
Readonly
optsInherited from AbstractWorker.opts
Binds the given function to execute to this AsyncResource
's scope.
The returned function will have an asyncResource
property referencing
@@ -196,10 +196,10 @@ the AsyncResource
to which the function is bound.
The function to bind to the current AsyncResource
.
Inherited from AbstractWorker.bind
AsyncResource
to which the function is bound.
Inherited from AbstractWorker.checkAlive
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
@@ -226,7 +226,7 @@ never be called.
A reference to asyncResource
.
Inherited from AbstractWorker.emitDestroy
Inherited from AbstractWorker.getMainWorker
Protected
handleOverrides 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.
Optional
data: DataOptional
data: DataInput data for the given function.
Inherited from AbstractWorker.run
Protected
runRuns the given function asynchronously.
Function that will be executed.
Optional
data: DataOptional
data: DataInput data for the given function.
Inherited from AbstractWorker.runAsync
Call the provided function with the provided arguments in the execution context of the async resource. This will establish the context, trigger the AsyncHooks @@ -381,38 +381,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 AbstractWorker.runInAsyncScope
Protected
sendOverrides AbstractWorker.sendToMainWorker
Static
bindBinds the given function to the current execution context.
The returned function will have an asyncResource
property referencing
@@ -452,14 +452,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 AbstractWorker.bind
Generated using TypeDoc
Constructs a new poolifier dynamic cluster pool.
Options for this dynamic cluster pool.
Overrides FixedClusterPool.constructor
Inherited from FixedClusterPool.emitter
Readonly
fileInherited from FixedClusterPool.filePath
Readonly
maxMaximum number of workers that can be created by this pool.
Readonly
numberInherited from FixedClusterPool.numberOfWorkers
Readonly
optsInherited from FixedClusterPool.opts
Protected
promiseThe execution response promise map.
key
: The message id of each submitted task.Inherited from FixedClusterPool.promiseResponseMap
Protected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
Default to a round robin algorithm.
Inherited from FixedClusterPool.workerChoiceStrategyContext
Readonly
workerInherited from FixedClusterPool.workerNodes
Overrides FixedClusterPool.busy
Overrides FixedClusterPool.full
Private
numberInherited from FixedClusterPool.numberOfQueuedTasks
Private
numberInherited from FixedClusterPool.numberOfRunningTasks
Overrides FixedClusterPool.type
Protected
afterHook executed after the worker task execution. Can be overridden.
@@ -276,13 +276,13 @@ Can be overridden.The worker.
The received message.
Inherited from FixedClusterPool.afterTaskExecutionHook
Protected
afterInherited from FixedClusterPool.afterWorkerSetup
Protected
beforeInherited from FixedClusterPool.beforeTaskExecutionHook
Protected
chooseChooses a worker node for the next task.
The default uses a round robin algorithm to distribute the load.
[worker node key, worker node].
Inherited from FixedClusterPool.chooseWorkerNode
Protected
createInherited from FixedClusterPool.createAndSetupWorker
Protected
createInherited from FixedClusterPool.createWorker
Inherited from FixedClusterPool.destroy
Inherited from FixedClusterPool.destroyWorker
Inherited from FixedClusterPool.execute
Inherited from FixedClusterPool.findFreeWorkerNodeKey
Protected
internalInherited from FixedClusterPool.internalBusy
Protected
isInherited from FixedClusterPool.isMain
Inherited from FixedClusterPool.registerWorkerMessageListener
Protected
sendInherited from FixedClusterPool.sendToWorker
Inherited from FixedClusterPool.setWorkerChoiceStrategy
Protected
setupInherited from FixedClusterPool.setupHook
Protected
workerThis function is the listener registered for each worker message.
The listener function to execute when a message is received from a worker.
This function is the listener registered for each worker message.
@@ -532,15 +532,16 @@ Can be overridden.Inherited from FixedClusterPool.workerListener
Generated using TypeDoc
Constructs a new poolifier dynamic thread pool.
Options for this dynamic thread pool.
Overrides FixedThreadPool.constructor
Inherited from FixedThreadPool.emitter
Readonly
fileInherited from FixedThreadPool.filePath
Readonly
maxMaximum number of threads that can be created by this pool.
Readonly
numberInherited from FixedThreadPool.numberOfWorkers
Readonly
optsInherited from FixedThreadPool.opts
Protected
promiseThe execution response promise map.
key
: The message id of each submitted task.Inherited from FixedThreadPool.promiseResponseMap
Protected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
Default to a round robin algorithm.
Inherited from FixedThreadPool.workerChoiceStrategyContext
Readonly
workerInherited from FixedThreadPool.workerNodes
Overrides FixedThreadPool.busy
Overrides FixedThreadPool.full
Private
numberInherited from FixedThreadPool.numberOfQueuedTasks
Private
numberInherited from FixedThreadPool.numberOfRunningTasks
Overrides FixedThreadPool.type
Protected
afterHook executed after the worker task execution. Can be overridden.
@@ -276,13 +276,13 @@ Can be overridden.The worker.
The received message.
Inherited from FixedThreadPool.afterTaskExecutionHook
Protected
afterInherited from FixedThreadPool.afterWorkerSetup
Protected
beforeInherited from FixedThreadPool.beforeTaskExecutionHook
Protected
chooseChooses a worker node for the next task.
The default uses a round robin algorithm to distribute the load.
[worker node key, worker node].
Inherited from FixedThreadPool.chooseWorkerNode
Protected
createInherited from FixedThreadPool.createAndSetupWorker
Protected
createInherited from FixedThreadPool.createWorker
Inherited from FixedThreadPool.destroy
Inherited from FixedThreadPool.destroyWorker
Inherited from FixedThreadPool.execute
Inherited from FixedThreadPool.findFreeWorkerNodeKey
Protected
internalInherited from FixedThreadPool.internalBusy
Protected
isInherited from FixedThreadPool.isMain
Inherited from FixedThreadPool.registerWorkerMessageListener
Protected
sendInherited from FixedThreadPool.sendToWorker
Inherited from FixedThreadPool.setWorkerChoiceStrategy
Protected
setupInherited from FixedThreadPool.setupHook
Protected
workerThis function is the listener registered for each worker message.
The listener function to execute when a message is received from a worker.
This function is the listener registered for each worker message.
@@ -533,15 +533,16 @@ Can be overriddenInherited from FixedThreadPool.workerListener
Generated using TypeDoc
Constructs a new poolifier fixed cluster pool.
Options for this fixed cluster pool.
Overrides AbstractPool<Worker, Data, Response>.constructor
Inherited from AbstractPool.emitter
Readonly
fileInherited from AbstractPool.filePath
Readonly
numberInherited from AbstractPool.numberOfWorkers
Readonly
optsInherited from AbstractPool.opts
Protected
promiseThe execution response promise map.
key
: The message id of each submitted task.Inherited from AbstractPool.promiseResponseMap
Protected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
Default to a round robin algorithm.
Inherited from AbstractPool.workerChoiceStrategyContext
Readonly
workerInherited from AbstractPool.workerNodes
Overrides AbstractPool.busy
Overrides AbstractPool.full
Private
numberInherited from AbstractPool.numberOfQueuedTasks
Private
numberInherited from AbstractPool.numberOfRunningTasks
Overrides AbstractPool.type
Protected
afterHook executed after the worker task execution. Can be overridden.
@@ -266,13 +266,13 @@ Can be overridden.The worker.
The received message.
Inherited from AbstractPool.afterTaskExecutionHook
Protected
afterOverrides AbstractPool.afterWorkerSetup
Protected
beforeInherited from AbstractPool.beforeTaskExecutionHook
Protected
chooseChooses a worker node for the next task.
The default uses a round robin algorithm to distribute the load.
[worker node key, worker node].
Inherited from AbstractPool.chooseWorkerNode
Protected
createInherited from AbstractPool.createAndSetupWorker
Protected
createOverrides AbstractPool.createWorker
Inherited from AbstractPool.destroy
Overrides AbstractPool.destroyWorker
Inherited from AbstractPool.execute
Inherited from AbstractPool.findFreeWorkerNodeKey
Protected
internalInherited from AbstractPool.internalBusy
Protected
isOverrides AbstractPool.isMain
Overrides AbstractPool.registerWorkerMessageListener
Protected
sendOverrides AbstractPool.sendToWorker
Inherited from AbstractPool.setWorkerChoiceStrategy
Protected
setupOverrides AbstractPool.setupHook
Protected
workerThis function is the listener registered for each worker message.
The listener function to execute when a message is received from a worker.
This function is the listener registered for each worker message.
@@ -522,15 +522,16 @@ Can be overridden.Inherited from AbstractPool.workerListener
Generated using TypeDoc
Constructs a new poolifier fixed thread pool.
Options for this fixed thread pool.
Overrides AbstractPool<ThreadWorkerWithMessageChannel, Data, Response>.constructor
Inherited from AbstractPool.emitter
Readonly
fileInherited from AbstractPool.filePath
Readonly
numberInherited from AbstractPool.numberOfWorkers
Readonly
optsInherited from AbstractPool.opts
Protected
promiseThe execution response promise map.
key
: The message id of each submitted task.Inherited from AbstractPool.promiseResponseMap
Protected
workerWorker choice strategy context referencing a worker choice algorithm implementation.
Default to a round robin algorithm.
Inherited from AbstractPool.workerChoiceStrategyContext
Readonly
workerInherited from AbstractPool.workerNodes
Overrides AbstractPool.busy
Overrides AbstractPool.full
Private
numberInherited from AbstractPool.numberOfQueuedTasks
Private
numberInherited from AbstractPool.numberOfRunningTasks
Overrides AbstractPool.type
Protected
afterHook executed after the worker task execution. Can be overridden.
@@ -266,13 +266,13 @@ Can be overridden.The worker.
The received message.
Inherited from AbstractPool.afterTaskExecutionHook
Protected
afterOverrides AbstractPool.afterWorkerSetup
Protected
beforeInherited from AbstractPool.beforeTaskExecutionHook
Protected
chooseChooses a worker node for the next task.
The default uses a round robin algorithm to distribute the load.
[worker node key, worker node].
Inherited from AbstractPool.chooseWorkerNode
Protected
createInherited from AbstractPool.createAndSetupWorker
Protected
createOverrides AbstractPool.createWorker
Inherited from AbstractPool.destroy
Overrides AbstractPool.destroyWorker
Inherited from AbstractPool.execute
Inherited from AbstractPool.findFreeWorkerNodeKey
Protected
internalInherited from AbstractPool.internalBusy
Protected
isOverrides AbstractPool.isMain
Overrides AbstractPool.registerWorkerMessageListener
Protected
sendOverrides AbstractPool.sendToWorker
Inherited from AbstractPool.setWorkerChoiceStrategy
Protected
setupInherited from AbstractPool.setupHook
Protected
workerThis function is the listener registered for each worker message.
The listener function to execute when a message is received from a worker.
This function is the listener registered for each worker message.
@@ -523,15 +523,16 @@ Can be overriddenInherited from AbstractPool.workerListener
Generated using TypeDoc
Inherited from EventEmitter.setMaxListeners
Generated using TypeDoc
Constructs a new poolifier thread worker.
Function processed by the worker when the pool's execution
function is invoked.
Options for the worker.
Overrides AbstractWorker<MessagePort, Data, Response>.constructor
Inherited from AbstractWorker.aliveInterval
Protected
Readonly
isInherited from AbstractWorker.isMain
Protected
lastInherited from AbstractWorker.lastTaskTimestamp
Protected
mainInherited from AbstractWorker.mainWorker
Protected
Readonly
optsInherited from AbstractWorker.opts
Binds the given function to execute to this AsyncResource
's scope.
The returned function will have an asyncResource
property referencing
@@ -196,10 +196,10 @@ the AsyncResource
to which the function is bound.
The function to bind to the current AsyncResource
.
Inherited from AbstractWorker.bind
AsyncResource
to which the function is bound.
Inherited from AbstractWorker.checkAlive
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
@@ -226,7 +226,7 @@ never be called.
A reference to asyncResource
.
Inherited from AbstractWorker.emitDestroy
Inherited from AbstractWorker.getMainWorker
Protected
handleInherited 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.
Optional
data: DataOptional
data: DataInput data for the given function.
Inherited from AbstractWorker.run
Protected
runRuns the given function asynchronously.
Function that will be executed.
Optional
data: DataOptional
data: DataInput data for the given function.
Inherited from AbstractWorker.runAsync
Call the provided function with the provided arguments in the execution context of the async resource. This will establish the context, trigger the AsyncHooks @@ -385,38 +385,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 AbstractWorker.runInAsyncScope
Protected
sendOverrides AbstractWorker.sendToMainWorker
Static
bindBinds the given function to the current execution context.
The returned function will have an asyncResource
property referencing
@@ -456,14 +456,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 AbstractWorker.bind
Generated using TypeDoc
Generated using TypeDoc
Inherited from PoolOptions.enableEvents
Optional
Experimental
enableInherited from PoolOptions.enableTasksQueue
Optional
envhttps://nodejs.org/api/cluster.html#cluster_cluster_fork_env
Optional
errorInherited from PoolOptions.errorHandler
Optional
exitInherited from PoolOptions.exitHandler
Optional
messageInherited from PoolOptions.messageHandler
Optional
onlineInherited from PoolOptions.onlineHandler
Optional
settingshttps://nodejs.org/api/cluster.html#cluster_cluster_settings
Optional
Experimental
tasksPool worker tasks queue options.
+ +{ concurrency: 1 }
+Inherited from PoolOptions.tasksQueueOptions
+Optional
workerInherited from PoolOptions.workerChoiceStrategy
Optional
workerInherited from PoolOptions.workerChoiceStrategyOptions
Generated using TypeDoc
Optional
Readonly
emitterPerforms the task specified in the constructor with the data parameter.
@@ -94,12 +94,12 @@The input for the specified task. This can only be serializable data.
Generated using TypeDoc
true
Optional
Experimental
enablefalse
Optional
errorA function that will listen for error event on each worker.
Optional
exitA function that will listen for exit event on each worker.
Optional
messageA function that will listen for message event on each worker.
Optional
onlineA function that will listen for online event on each worker.
Optional
Experimental
tasksPool worker tasks queue options.
+ +{ concurrency: 1 }
+Optional
workerThe worker choice strategy to use in this pool.
Optional
workerThe worker choice strategy options.
Generated using TypeDoc
Use tasks median run time instead of average run time.
Generated using TypeDoc
false
Optional
killKillBehaviors.SOFT
Optional
max60000 ms
Generated using TypeDoc
Callback invoked if the worker raised an error.
Generated using TypeDoc
Callback invoked when the worker exits successfully.
Generated using TypeDoc
Generated using TypeDoc
Callback invoked if the worker has received a message.
Generated using TypeDoc
Callback invoked when the worker has started successfully.
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Generated using TypeDoc
Constructs a new poolifier cluster worker.