1 <!DOCTYPE html
><html class=
"default" lang=
"en"><head><meta charset=
"utf-8"/><meta http-equiv=
"x-ua-compatible" content=
"IE=edge"/><title>ClusterWorker | poolifier - v4.0
.15</title><meta name=
"description" content=
"Documentation for poolifier"/><meta name=
"viewport" content=
"width=device-width, initial-scale=1"/><link rel=
"stylesheet" href=
"../assets/style.css"/><link rel=
"stylesheet" href=
"../assets/highlight.css"/><script defer
src=
"../assets/main.js"></script><script async
src=
"../assets/icons.js" id=
"tsd-icons-script"></script><script async
src=
"../assets/search.js" id=
"tsd-search-script"></script><script async
src=
"../assets/navigation.js" id=
"tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem(
"tsd-theme") ||
"os";document.body.style.
display=
"none";setTimeout(() =
> app?app.showPage():document.body.style.removeProperty(
"display"),
500)
</script><header class=
"tsd-page-toolbar"><div class=
"tsd-toolbar-contents container"><div class=
"table-cell" id=
"tsd-search" data-base=
".."><div class=
"field"><label for=
"tsd-search-field" class=
"tsd-widget tsd-toolbar-icon search no-caption"><svg width=
"16" height=
"16" viewBox=
"0 0 16 16" fill=
"none"><use href=
"../assets/icons.svg#icon-search"></use></svg></label><input type=
"text" id=
"tsd-search-field" aria-label=
"Search"/></div><div class=
"field"><div id=
"tsd-toolbar-links"></div></div><ul class=
"results"><li class=
"state loading">Preparing search index...
</li><li class=
"state failure">The search index is not available
</li></ul><a href=
"../index.html" class=
"title">poolifier - v4.0
.15</a></div><div class=
"table-cell" id=
"tsd-widgets"><a href=
"#" class=
"tsd-widget tsd-toolbar-icon menu no-caption" data-toggle=
"menu" aria-label=
"Menu"><svg width=
"16" height=
"16" viewBox=
"0 0 16 16" fill=
"none"><use href=
"../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class=
"container container-main"><div class=
"col-content"><div class=
"tsd-page-title"><ul class=
"tsd-breadcrumb"><li><a href=
"../index.html">poolifier
</a></li><li><a href=
"ClusterWorker.html">ClusterWorker
</a></li></ul><h1>Class ClusterWorker
<Data, Response
></h1></div><section class=
"tsd-panel tsd-comment"><div class=
"tsd-comment tsd-typography"><p>A cluster worker used by a poolifier
<code>ClusterPool
</code>.
</p>
2 <p>When this worker is inactive for more than the given
<code>maxInactiveTime
</code>,
3 it will send a termination request to its main worker.
</p>
4 <p>If you use a
<code>DynamicClusterPool
</code> the extra workers that were created will be terminated,
5 but the minimum number of workers will be guaranteed.
</p>
6 </div><div class=
"tsd-comment tsd-typography"><h4 class=
"tsd-anchor-link"><a id=
"Author" class=
"tsd-anchor"></a>Author
<a href=
"#Author" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href=
"https://github.com/Shinigami92">Christopher Quadflieg
</a></p>
7 <h4 class=
"tsd-anchor-link"><a id=
"Since" class=
"tsd-anchor"></a>Since
<a href=
"#Since" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>2.0.0</p>
8 </div></section> <section class=
"tsd-panel"><h4>Type Parameters
</h4><ul class=
"tsd-type-parameter-list"><li><span><a id=
"Data" class=
"tsd-anchor"></a><span class=
"tsd-kind-type-parameter">Data
</span> =
<span class=
"tsd-signature-type">unknown
</span></span><div class=
"tsd-comment tsd-typography"><p>Type of data this worker receives from pool's execution. This can only be structured-cloneable data.
</p>
9 </div><div class=
"tsd-comment tsd-typography"></div></li><li><span><a id=
"Response" class=
"tsd-anchor"></a><span class=
"tsd-kind-type-parameter">Response
</span> =
<span class=
"tsd-signature-type">unknown
</span></span><div class=
"tsd-comment tsd-typography"><p>Type of response the worker sends back to the main worker. This can only be structured-cloneable data.
</p>
10 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></section> <section class=
"tsd-panel tsd-hierarchy"><h4>Hierarchy (
<a href=
"../hierarchy.html#ClusterWorker">view full
</a>)
</h4><ul class=
"tsd-hierarchy"><li><a href=
"AbstractWorker.html" class=
"tsd-signature-type tsd-kind-class">AbstractWorker
</a><span class=
"tsd-signature-symbol"><</span><span class=
"tsd-signature-type">Worker
</span><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span><ul class=
"tsd-hierarchy"><li><span class=
"target">ClusterWorker
</span></li></ul></li></ul></section><aside class=
"tsd-sources"><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/cluster-worker.ts#L21">src/worker/cluster-worker.ts:
21</a></li></ul></aside><section class=
"tsd-panel-group tsd-index-group"><section class=
"tsd-panel tsd-index-panel"><details class=
"tsd-index-content tsd-accordion" open
><summary class=
"tsd-accordion-summary tsd-index-summary"><h5 class=
"tsd-index-heading uppercase" role=
"button" aria-expanded=
"false" tabIndex=
"0"><svg width=
"16" height=
"16" viewBox=
"0 0 16 16" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronSmall"></use></svg> Index
</h5></summary><div class=
"tsd-accordion-details"><section class=
"tsd-index-section"><h3 class=
"tsd-index-heading">Constructors
</h3><div class=
"tsd-index-list"><a href=
"ClusterWorker.html#constructor" class=
"tsd-index-link"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-512"></use></svg><span>constructor
</span></a>
11 </div></section><section class=
"tsd-index-section"><h3 class=
"tsd-index-heading">Properties
</h3><div class=
"tsd-index-list"><a href=
"ClusterWorker.html#activeInterval" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>active
<wbr/>Interval?
</span></a>
12 <a href=
"ClusterWorker.html#isMain" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>is
<wbr/>Main
</span></a>
13 <a href=
"ClusterWorker.html#lastTaskTimestamp" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>last
<wbr/>Task
<wbr/>Timestamp
</span></a>
14 <a href=
"ClusterWorker.html#opts" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>opts
</span></a>
15 <a href=
"ClusterWorker.html#statistics" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>statistics?
</span></a>
16 <a href=
"ClusterWorker.html#taskFunctions" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>task
<wbr/>Functions
</span></a>
17 </div></section><section class=
"tsd-index-section"><h3 class=
"tsd-index-heading">Accessors
</h3><div class=
"tsd-index-list"><a href=
"ClusterWorker.html#id" class=
"tsd-index-link tsd-is-protected"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-262144"></use></svg><span>id
</span></a>
18 </div></section><section class=
"tsd-index-section"><h3 class=
"tsd-index-heading">Methods
</h3><div class=
"tsd-index-list"><a href=
"ClusterWorker.html#addTaskFunction" class=
"tsd-index-link tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>add
<wbr/>Task
<wbr/>Function
</span></a>
19 <a href=
"ClusterWorker.html#getMainWorker" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>get
<wbr/>Main
<wbr/>Worker
</span></a>
20 <a href=
"ClusterWorker.html#handleError" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Error
</span></a>
21 <a href=
"ClusterWorker.html#handleKillMessage" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Kill
<wbr/>Message
</span></a>
22 <a href=
"ClusterWorker.html#handleReadyMessage" class=
"tsd-index-link tsd-is-protected"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Ready
<wbr/>Message
</span></a>
23 <a href=
"ClusterWorker.html#handleTaskFunctionOperationMessage" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Task
<wbr/>Function
<wbr/>Operation
<wbr/>Message
</span></a>
24 <a href=
"ClusterWorker.html#hasTaskFunction" class=
"tsd-index-link tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>has
<wbr/>Task
<wbr/>Function
</span></a>
25 <a href=
"ClusterWorker.html#listTaskFunctionsProperties" class=
"tsd-index-link tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>list
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
</span></a>
26 <a href=
"ClusterWorker.html#messageListener" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>message
<wbr/>Listener
</span></a>
27 <a href=
"ClusterWorker.html#removeTaskFunction" class=
"tsd-index-link tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>remove
<wbr/>Task
<wbr/>Function
</span></a>
28 <a href=
"ClusterWorker.html#run" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>run
</span></a>
29 <a href=
"ClusterWorker.html#runAsync" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>run
<wbr/>Async
</span></a>
30 <a href=
"ClusterWorker.html#runSync" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>run
<wbr/>Sync
</span></a>
31 <a href=
"ClusterWorker.html#sendTaskFunctionsPropertiesToMainWorker" class=
"tsd-index-link tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>send
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span></a>
32 <a href=
"ClusterWorker.html#sendToMainWorker" class=
"tsd-index-link tsd-is-protected"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>send
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span></a>
33 <a href=
"ClusterWorker.html#setDefaultTaskFunction" class=
"tsd-index-link tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>set
<wbr/>Default
<wbr/>Task
<wbr/>Function
</span></a>
34 </div></section></div></details></section></section><details class=
"tsd-panel-group tsd-member-group tsd-accordion" open
><summary class=
"tsd-accordion-summary" data-key=
"section-Constructors"><h2><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg> Constructors
</h2></summary><section><section class=
"tsd-panel tsd-member"><a id=
"constructor" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><span>constructor
</span><a href=
"#constructor" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures"><li class=
"tsd-signature tsd-anchor-link"><a id=
"constructor.new_ClusterWorker" class=
"tsd-anchor"></a><span class=
"tsd-kind-constructor-signature">new
<wbr/>Cluster
<wbr/>Worker
</span><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">taskFunctions
</span>,
<span class=
"tsd-kind-parameter">opts
</span><span class=
"tsd-signature-symbol">?
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><a href=
"ClusterWorker.html" class=
"tsd-signature-type tsd-kind-class">ClusterWorker
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span><a href=
"#constructor.new_ClusterWorker" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Constructs a new poolifier cluster worker.
</p>
35 </div><section class=
"tsd-panel"><h4>Type Parameters
</h4><ul class=
"tsd-type-parameter-list"><li><span><a id=
"constructor.new_ClusterWorker.Data-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-type-parameter">Data
</span> =
<span class=
"tsd-signature-type">unknown
</span></span></li><li><span><a id=
"constructor.new_ClusterWorker.Response-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-type-parameter">Response
</span> =
<span class=
"tsd-signature-type">unknown
</span></span></li></ul></section><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">taskFunctions
</span>:
<a href=
"../types/TaskFunction.html" class=
"tsd-signature-type tsd-kind-type-alias">TaskFunction
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span><span class=
"tsd-signature-symbol"> |
</span><a href=
"../types/TaskFunctions.html" class=
"tsd-signature-type tsd-kind-type-alias">TaskFunctions
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>Task function(s) processed by the worker when the pool's
<code>execution
</code> function is invoked.
</p>
36 </div><div class=
"tsd-comment tsd-typography"></div></li><li><span><span class=
"tsd-kind-parameter">opts
</span>:
<a href=
"../interfaces/WorkerOptions.html" class=
"tsd-signature-type tsd-kind-interface">WorkerOptions
</a><span class=
"tsd-signature-symbol"> = {}
</span></span><div class=
"tsd-comment tsd-typography"><p>Options for the worker.
</p>
37 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<a href=
"ClusterWorker.html" class=
"tsd-signature-type tsd-kind-class">ClusterWorker
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Overrides
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#constructor">constructor
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/cluster-worker.ts#L30">src/worker/cluster-worker.ts:
30</a></li></ul></aside></li></ul></section></section></details><details class=
"tsd-panel-group tsd-member-group tsd-accordion" open
><summary class=
"tsd-accordion-summary" data-key=
"section-Properties"><h2><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg> Properties
</h2></summary><section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"activeInterval" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Optional
</code><span>active
<wbr/>Interval
</span><a href=
"#activeInterval" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class=
"tsd-signature"><span class=
"tsd-kind-property">active
<wbr/>Interval
</span><span class=
"tsd-signature-symbol">?:
</span> <span class=
"tsd-signature-type">Timeout
</span></div><div class=
"tsd-comment tsd-typography"><p>Handler id of the
<code>activeInterval
</code> worker activity check.
</p>
38 </div><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#activeInterval">activeInterval
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L81">src/worker/abstract-worker.ts:
81</a></li></ul></aside></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"isMain" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Readonly
</code><span>is
<wbr/>Main
</span><a href=
"#isMain" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class=
"tsd-signature"><span class=
"tsd-kind-property">is
<wbr/>Main
</span><span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">undefined
</span><span class=
"tsd-signature-symbol"> |
</span><span class=
"tsd-signature-type">boolean
</span></div><div class=
"tsd-comment tsd-typography"><p>Whether this is the main worker or not.
</p>
39 </div><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#isMain">isMain
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L91">src/worker/abstract-worker.ts:
91</a></li></ul></aside></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"lastTaskTimestamp" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>last
<wbr/>Task
<wbr/>Timestamp
</span><a href=
"#lastTaskTimestamp" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class=
"tsd-signature"><span class=
"tsd-kind-property">last
<wbr/>Task
<wbr/>Timestamp
</span><span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">number
</span></div><div class=
"tsd-comment tsd-typography"><p>Timestamp of the last task processed by this worker.
</p>
40 </div><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#lastTaskTimestamp">lastTaskTimestamp
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L73">src/worker/abstract-worker.ts:
73</a></li></ul></aside></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"opts" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>opts
</span><a href=
"#opts" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class=
"tsd-signature"><span class=
"tsd-kind-property">opts
</span><span class=
"tsd-signature-symbol">:
</span> <a href=
"../interfaces/WorkerOptions.html" class=
"tsd-signature-type tsd-kind-interface">WorkerOptions
</a><span class=
"tsd-signature-symbol"> = DEFAULT_WORKER_OPTIONS
</span></div><div class=
"tsd-comment tsd-typography"><p>Options for the worker.
</p>
41 </div><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#opts">opts
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L94">src/worker/abstract-worker.ts:
94</a></li></ul></aside></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"statistics" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Optional
</code><span>statistics
</span><a href=
"#statistics" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class=
"tsd-signature"><span class=
"tsd-kind-property">statistics
</span><span class=
"tsd-signature-symbol">?:
</span> <a href=
"../interfaces/WorkerStatistics.html" class=
"tsd-signature-type tsd-kind-interface">WorkerStatistics
</a></div><div class=
"tsd-comment tsd-typography"><p>Performance statistics computation requirements.
</p>
42 </div><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#statistics">statistics
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L77">src/worker/abstract-worker.ts:
77</a></li></ul></aside></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"taskFunctions" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>task
<wbr/>Functions
</span><a href=
"#taskFunctions" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class=
"tsd-signature"><span class=
"tsd-kind-property">task
<wbr/>Functions
</span><span class=
"tsd-signature-symbol">:
</span> <span class=
"tsd-signature-type">Map
</span><span class=
"tsd-signature-symbol"><</span><span class=
"tsd-signature-type">string
</span><span class=
"tsd-signature-symbol">,
</span><a href=
"../interfaces/TaskFunctionObject.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionObject
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span><span class=
"tsd-signature-symbol">></span></div><div class=
"tsd-comment tsd-typography"><p>Task function object(s) processed by the worker when the pool's
<code>execution
</code> function is invoked.
</p>
43 </div><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#taskFunctions">taskFunctions
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L69">src/worker/abstract-worker.ts:
69</a></li></ul></aside></section></section></details><details class=
"tsd-panel-group tsd-member-group tsd-accordion" open
><summary class=
"tsd-accordion-summary" data-key=
"section-Accessors"><h2><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg> Accessors
</h2></summary><section><section class=
"tsd-panel tsd-member tsd-is-protected"><a id=
"id" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>id
</span><a href=
"#id" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected"><li class=
"tsd-signature" id=
"id.id-1"><span class=
"tsd-signature-keyword">get
</span> id
<span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">number
</span></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Worker id.
</p>
44 </div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">number
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Overrides AbstractWorker.id
</p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/cluster-worker.ts#L56">src/worker/cluster-worker.ts:
56</a></li></ul></aside></li></ul></section></section></details><details class=
"tsd-panel-group tsd-member-group tsd-accordion" open
><summary class=
"tsd-accordion-summary" data-key=
"section-Methods"><h2><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg> Methods
</h2></summary><section><section class=
"tsd-panel tsd-member tsd-is-inherited"><a id=
"addTaskFunction" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><span>add
<wbr/>Task
<wbr/>Function
</span><a href=
"#addTaskFunction" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"addTaskFunction.addTaskFunction-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">add
<wbr/>Task
<wbr/>Function
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">name
</span>,
<span class=
"tsd-kind-parameter">fn
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a><a href=
"#addTaskFunction.addTaskFunction-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Adds a task function to the worker.
45 If a task function with the same name already exists, it is replaced.
</p>
46 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">name
</span>:
<span class=
"tsd-signature-type">string
</span></span><div class=
"tsd-comment tsd-typography"><p>The name of the task function to add.
</p>
47 </div><div class=
"tsd-comment tsd-typography"></div></li><li><span><span class=
"tsd-kind-parameter">fn
</span>:
<a href=
"../types/TaskFunction.html" class=
"tsd-signature-type tsd-kind-type-alias">TaskFunction
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span><span class=
"tsd-signature-symbol"> |
</span><a href=
"../interfaces/TaskFunctionObject.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionObject
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>The task function to add.
</p>
48 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a></h4><p>Whether the task function was added or not.
</p>
49 <div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#addTaskFunction">addTaskFunction
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L184">src/worker/abstract-worker.ts:
184</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"getMainWorker" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>get
<wbr/>Main
<wbr/>Worker
</span><a href=
"#getMainWorker" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"getMainWorker.getMainWorker-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">get
<wbr/>Main
<wbr/>Worker
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">Worker
</span><a href=
"#getMainWorker.getMainWorker-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Returns the main worker.
</p>
50 </div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">Worker
</span></h4><p>Reference to the main worker.
</p>
51 <div class=
"tsd-comment tsd-typography"><h4 class=
"tsd-anchor-link"><a id=
"Throws" class=
"tsd-anchor"></a>Throws
<a href=
"#Throws" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href=
"https://nodejs.org/api/errors.html#class-error">https://nodejs.org/api/errors.html#class-error
</a> If the main worker is not set.
</p>
52 </div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#getMainWorker">getMainWorker
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L473">src/worker/abstract-worker.ts:
473</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"handleError" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>handle
<wbr/>Error
</span><a href=
"#handleError" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"handleError.handleError-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">handle
<wbr/>Error
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">error
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">string
</span><a href=
"#handleError.handleError-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Handles an error and convert it to a string so it can be sent back to the main worker.
</p>
53 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">error
</span>:
<span class=
"tsd-signature-type">string
</span><span class=
"tsd-signature-symbol"> |
</span><span class=
"tsd-signature-type">Error
</span></span><div class=
"tsd-comment tsd-typography"><p>The error raised by the worker.
</p>
54 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">string
</span></h4><p>The error message.
</p>
55 <div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#handleError">handleError
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L502">src/worker/abstract-worker.ts:
502</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"handleKillMessage" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>handle
<wbr/>Kill
<wbr/>Message
</span><a href=
"#handleKillMessage" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"handleKillMessage.handleKillMessage-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">handle
<wbr/>Kill
<wbr/>Message
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">message
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#handleKillMessage.handleKillMessage-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Handles a kill message sent by the main worker.
</p>
56 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">message
</span>:
<a href=
"../interfaces/MessageValue.html" class=
"tsd-signature-type tsd-kind-interface">MessageValue
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><span class=
"tsd-signature-type">unknown
</span><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>The kill message.
</p>
57 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#handleKillMessage">handleKillMessage
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L399">src/worker/abstract-worker.ts:
399</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected"><a id=
"handleReadyMessage" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>handle
<wbr/>Ready
<wbr/>Message
</span><a href=
"#handleReadyMessage" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected"><li class=
"tsd-signature tsd-anchor-link"><a id=
"handleReadyMessage.handleReadyMessage-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">handle
<wbr/>Ready
<wbr/>Message
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">message
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#handleReadyMessage.handleReadyMessage-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Handles the ready message sent by the main worker.
</p>
58 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">message
</span>:
<a href=
"../interfaces/MessageValue.html" class=
"tsd-signature-type tsd-kind-interface">MessageValue
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><span class=
"tsd-signature-type">unknown
</span><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>The ready message.
</p>
59 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Overrides
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#handleReadyMessage">handleReadyMessage
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/cluster-worker.ts#L38">src/worker/cluster-worker.ts:
38</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"handleTaskFunctionOperationMessage" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>handle
<wbr/>Task
<wbr/>Function
<wbr/>Operation
<wbr/>Message
</span><a href=
"#handleTaskFunctionOperationMessage" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"handleTaskFunctionOperationMessage.handleTaskFunctionOperationMessage-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">handle
<wbr/>Task
<wbr/>Function
<wbr/>Operation
<wbr/>Message
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">message
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#handleTaskFunctionOperationMessage.handleTaskFunctionOperationMessage-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">message
</span>:
<a href=
"../interfaces/MessageValue.html" class=
"tsd-signature-type tsd-kind-interface">MessageValue
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><span class=
"tsd-signature-type">unknown
</span><span class=
"tsd-signature-symbol">></span></span></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#handleTaskFunctionOperationMessage">handleTaskFunctionOperationMessage
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L343">src/worker/abstract-worker.ts:
343</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-inherited"><a id=
"hasTaskFunction" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><span>has
<wbr/>Task
<wbr/>Function
</span><a href=
"#hasTaskFunction" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"hasTaskFunction.hasTaskFunction-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">has
<wbr/>Task
<wbr/>Function
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">name
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a><a href=
"#hasTaskFunction.hasTaskFunction-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Checks if the worker has a task function with the given name.
</p>
60 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">name
</span>:
<span class=
"tsd-signature-type">string
</span></span><div class=
"tsd-comment tsd-typography"><p>The name of the task function to check.
</p>
61 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a></h4><p>Whether the worker has a task function with the given name or not.
</p>
62 <div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#hasTaskFunction">hasTaskFunction
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L168">src/worker/abstract-worker.ts:
168</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-inherited"><a id=
"listTaskFunctionsProperties" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><span>list
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
</span><a href=
"#listTaskFunctionsProperties" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"listTaskFunctionsProperties.listTaskFunctionsProperties-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">list
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><a href=
"../interfaces/TaskFunctionProperties.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionProperties
</a><span class=
"tsd-signature-symbol">[]
</span><a href=
"#listTaskFunctionsProperties.listTaskFunctionsProperties-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Lists the properties of the worker's task functions.
</p>
63 </div><h4 class=
"tsd-returns-title">Returns
<a href=
"../interfaces/TaskFunctionProperties.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionProperties
</a><span class=
"tsd-signature-symbol">[]
</span></h4><p>The properties of the worker's task functions.
</p>
64 <div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#listTaskFunctionsProperties">listTaskFunctionsProperties
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L247">src/worker/abstract-worker.ts:
247</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"messageListener" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>message
<wbr/>Listener
</span><a href=
"#messageListener" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"messageListener.messageListener-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">message
<wbr/>Listener
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">message
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#messageListener.messageListener-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Worker message listener.
</p>
65 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">message
</span>:
<a href=
"../interfaces/MessageValue.html" class=
"tsd-signature-type tsd-kind-interface">MessageValue
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><span class=
"tsd-signature-type">unknown
</span><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>The received message.
</p>
66 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#messageListener">messageListener
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L315">src/worker/abstract-worker.ts:
315</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-inherited"><a id=
"removeTaskFunction" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><span>remove
<wbr/>Task
<wbr/>Function
</span><a href=
"#removeTaskFunction" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"removeTaskFunction.removeTaskFunction-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">remove
<wbr/>Task
<wbr/>Function
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">name
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a><a href=
"#removeTaskFunction.removeTaskFunction-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Removes a task function from the worker.
</p>
67 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">name
</span>:
<span class=
"tsd-signature-type">string
</span></span><div class=
"tsd-comment tsd-typography"><p>The name of the task function to remove.
</p>
68 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a></h4><p>Whether the task function existed and was removed or not.
</p>
69 <div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#removeTaskFunction">removeTaskFunction
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L219">src/worker/abstract-worker.ts:
219</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"run" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Readonly
</code><span>run
</span><a href=
"#run" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"run.run-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">run
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">task
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#run.run-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Runs the given task.
</p>
70 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">task
</span>:
<a href=
"../interfaces/Task.html" class=
"tsd-signature-type tsd-kind-interface">Task
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>The task to execute.
</p>
71 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#run">run
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L510">src/worker/abstract-worker.ts:
510</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"runAsync" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Readonly
</code><span>run
<wbr/>Async
</span><a href=
"#runAsync" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"runAsync.runAsync-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">run
<wbr/>Async
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">fn
</span>,
<span class=
"tsd-kind-parameter">task
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#runAsync.runAsync-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Runs the given task function asynchronously.
</p>
72 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">fn
</span>:
<a href=
"../types/TaskAsyncFunction.html" class=
"tsd-signature-type tsd-kind-type-alias">TaskAsyncFunction
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>Task function that will be executed.
</p>
73 </div><div class=
"tsd-comment tsd-typography"></div></li><li><span><span class=
"tsd-kind-parameter">task
</span>:
<a href=
"../interfaces/Task.html" class=
"tsd-signature-type tsd-kind-interface">Task
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>Input data for the task function.
</p>
74 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#runAsync">runAsync
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L573">src/worker/abstract-worker.ts:
573</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"runSync" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Readonly
</code><span>run
<wbr/>Sync
</span><a href=
"#runSync" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"runSync.runSync-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">run
<wbr/>Sync
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">fn
</span>,
<span class=
"tsd-kind-parameter">task
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#runSync.runSync-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Runs the given task function synchronously.
</p>
75 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">fn
</span>:
<a href=
"../types/TaskSyncFunction.html" class=
"tsd-signature-type tsd-kind-type-alias">TaskSyncFunction
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">,
</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>Task function that will be executed.
</p>
76 </div><div class=
"tsd-comment tsd-typography"></div></li><li><span><span class=
"tsd-kind-parameter">task
</span>:
<a href=
"../interfaces/Task.html" class=
"tsd-signature-type tsd-kind-interface">Task
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Data-1">Data
</a><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>Input data for the task function.
</p>
77 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#runSync">runSync
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L539">src/worker/abstract-worker.ts:
539</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id=
"sendTaskFunctionsPropertiesToMainWorker" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code><span>send
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span><a href=
"#sendTaskFunctionsPropertiesToMainWorker" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"sendTaskFunctionsPropertiesToMainWorker.sendTaskFunctionsPropertiesToMainWorker-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">send
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#sendTaskFunctionsPropertiesToMainWorker.sendTaskFunctionsPropertiesToMainWorker-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Sends task functions properties to the main worker.
</p>
78 </div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#sendTaskFunctionsPropertiesToMainWorker">sendTaskFunctionsPropertiesToMainWorker
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L491">src/worker/abstract-worker.ts:
491</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-protected"><a id=
"sendToMainWorker" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><code class=
"tsd-tag">Protected
</code> <code class=
"tsd-tag">Readonly
</code><span>send
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span><a href=
"#sendToMainWorker" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-protected"><li class=
"tsd-signature tsd-anchor-link"><a id=
"sendToMainWorker.sendToMainWorker-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">send
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">message
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><span class=
"tsd-signature-type">void
</span><a href=
"#sendToMainWorker.sendToMainWorker-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Sends a message to main worker.
</p>
79 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">message
</span>:
<a href=
"../interfaces/MessageValue.html" class=
"tsd-signature-type tsd-kind-interface">MessageValue
</a><span class=
"tsd-signature-symbol"><</span><a class=
"tsd-signature-type tsd-kind-type-parameter" href=
"ClusterWorker.html#constructor.new_ClusterWorker.Response-1">Response
</a><span class=
"tsd-signature-symbol">,
</span><span class=
"tsd-signature-type">unknown
</span><span class=
"tsd-signature-symbol">></span></span><div class=
"tsd-comment tsd-typography"><p>The response message.
</p>
80 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<span class=
"tsd-signature-type">void
</span></h4><div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Overrides
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#sendToMainWorker">sendToMainWorker
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/cluster-worker.ts#L61">src/worker/cluster-worker.ts:
61</a></li></ul></aside></li></ul></section><section class=
"tsd-panel tsd-member tsd-is-inherited"><a id=
"setDefaultTaskFunction" class=
"tsd-anchor"></a><h3 class=
"tsd-anchor-link"><span>set
<wbr/>Default
<wbr/>Task
<wbr/>Function
</span><a href=
"#setDefaultTaskFunction" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class=
"tsd-signatures tsd-is-inherited"><li class=
"tsd-signature tsd-anchor-link"><a id=
"setDefaultTaskFunction.setDefaultTaskFunction-1" class=
"tsd-anchor"></a><span class=
"tsd-kind-call-signature">set
<wbr/>Default
<wbr/>Task
<wbr/>Function
</span><span class=
"tsd-signature-symbol">(
</span><span class=
"tsd-kind-parameter">name
</span><span class=
"tsd-signature-symbol">)
</span><span class=
"tsd-signature-symbol">:
</span><a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a><a href=
"#setDefaultTaskFunction.setDefaultTaskFunction-1" aria-label=
"Permalink" class=
"tsd-anchor-icon"><svg viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-anchor"></use></svg></a></li><li class=
"tsd-description"><div class=
"tsd-comment tsd-typography"><p>Sets the default task function to use in the worker.
</p>
81 </div><div class=
"tsd-parameters"><h4 class=
"tsd-parameters-title">Parameters
</h4><ul class=
"tsd-parameter-list"><li><span><span class=
"tsd-kind-parameter">name
</span>:
<span class=
"tsd-signature-type">string
</span></span><div class=
"tsd-comment tsd-typography"><p>The name of the task function to use as default task function.
</p>
82 </div><div class=
"tsd-comment tsd-typography"></div></li></ul></div><h4 class=
"tsd-returns-title">Returns
<a href=
"../interfaces/TaskFunctionOperationResult.html" class=
"tsd-signature-type tsd-kind-interface">TaskFunctionOperationResult
</a></h4><p>Whether the default task function was set or not.
</p>
83 <div class=
"tsd-comment tsd-typography"></div><aside class=
"tsd-sources"><p>Inherited from
<a href=
"AbstractWorker.html">AbstractWorker
</a>.
<a href=
"AbstractWorker.html#setDefaultTaskFunction">setDefaultTaskFunction
</a></p><ul><li>Defined in
<a href=
"https://github.com/poolifier/poolifier/blob/dea42379cfdbcf1c1c9800df7c097eab484ebc07/src/worker/abstract-worker.ts#L283">src/worker/abstract-worker.ts:
283</a></li></ul></aside></li></ul></section></section></details></div><div class=
"col-sidebar"><div class=
"page-menu"><div class=
"tsd-navigation settings"><details class=
"tsd-accordion"><summary class=
"tsd-accordion-summary"><h3><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg>Settings
</h3></summary><div class=
"tsd-accordion-details"><div class=
"tsd-filter-visibility"><span class=
"settings-label">Member Visibility
</span><ul id=
"tsd-filter-options"><li class=
"tsd-filter-item"><label class=
"tsd-filter-input"><input type=
"checkbox" id=
"tsd-filter-protected" name=
"protected"/><svg width=
"32" height=
"32" viewBox=
"0 0 32 32" aria-hidden=
"true"><rect class=
"tsd-checkbox-background" width=
"30" height=
"30" x=
"1" y=
"1" rx=
"6" fill=
"none"></rect><path class=
"tsd-checkbox-checkmark" d=
"M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke=
"none" stroke-width=
"3.5" stroke-linejoin=
"round" fill=
"none"></path></svg><span>Protected
</span></label></li><li class=
"tsd-filter-item"><label class=
"tsd-filter-input"><input type=
"checkbox" id=
"tsd-filter-inherited" name=
"inherited" checked
/><svg width=
"32" height=
"32" viewBox=
"0 0 32 32" aria-hidden=
"true"><rect class=
"tsd-checkbox-background" width=
"30" height=
"30" x=
"1" y=
"1" rx=
"6" fill=
"none"></rect><path class=
"tsd-checkbox-checkmark" d=
"M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke=
"none" stroke-width=
"3.5" stroke-linejoin=
"round" fill=
"none"></path></svg><span>Inherited
</span></label></li><li class=
"tsd-filter-item"><label class=
"tsd-filter-input"><input type=
"checkbox" id=
"tsd-filter-external" name=
"external"/><svg width=
"32" height=
"32" viewBox=
"0 0 32 32" aria-hidden=
"true"><rect class=
"tsd-checkbox-background" width=
"30" height=
"30" x=
"1" y=
"1" rx=
"6" fill=
"none"></rect><path class=
"tsd-checkbox-checkmark" d=
"M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke=
"none" stroke-width=
"3.5" stroke-linejoin=
"round" fill=
"none"></path></svg><span>External
</span></label></li></ul></div><div class=
"tsd-theme-toggle"><label class=
"settings-label" for=
"tsd-theme">Theme
</label><select id=
"tsd-theme"><option value=
"os">OS
</option><option value=
"light">Light
</option><option value=
"dark">Dark
</option></select></div></div></details></div><details open
class=
"tsd-accordion tsd-page-navigation"><summary class=
"tsd-accordion-summary"><h3><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg>On This Page
</h3></summary><div class=
"tsd-accordion-details"><details open
class=
"tsd-accordion tsd-page-navigation-section"><summary class=
"tsd-accordion-summary" data-key=
"tsd-otp-Constructors"><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg>Constructors
</summary><div><a href=
"#constructor" class=
""><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-512"></use></svg><span>constructor
</span></a></div></details><details open
class=
"tsd-accordion tsd-page-navigation-section"><summary class=
"tsd-accordion-summary" data-key=
"tsd-otp-Properties"><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg>Properties
</summary><div><a href=
"#activeInterval" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>active
<wbr/>Interval
</span></a><a href=
"#isMain" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>is
<wbr/>Main
</span></a><a href=
"#lastTaskTimestamp" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>last
<wbr/>Task
<wbr/>Timestamp
</span></a><a href=
"#opts" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>opts
</span></a><a href=
"#statistics" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>statistics
</span></a><a href=
"#taskFunctions" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1024"></use></svg><span>task
<wbr/>Functions
</span></a></div></details><details open
class=
"tsd-accordion tsd-page-navigation-section"><summary class=
"tsd-accordion-summary" data-key=
"tsd-otp-Accessors"><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg>Accessors
</summary><div><a href=
"#id" class=
"tsd-is-protected"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-262144"></use></svg><span>id
</span></a></div></details><details open
class=
"tsd-accordion tsd-page-navigation-section"><summary class=
"tsd-accordion-summary" data-key=
"tsd-otp-Methods"><svg width=
"20" height=
"20" viewBox=
"0 0 24 24" fill=
"none"><use href=
"../assets/icons.svg#icon-chevronDown"></use></svg>Methods
</summary><div><a href=
"#addTaskFunction" class=
"tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>add
<wbr/>Task
<wbr/>Function
</span></a><a href=
"#getMainWorker" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>get
<wbr/>Main
<wbr/>Worker
</span></a><a href=
"#handleError" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Error
</span></a><a href=
"#handleKillMessage" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Kill
<wbr/>Message
</span></a><a href=
"#handleReadyMessage" class=
"tsd-is-protected"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Ready
<wbr/>Message
</span></a><a href=
"#handleTaskFunctionOperationMessage" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>handle
<wbr/>Task
<wbr/>Function
<wbr/>Operation
<wbr/>Message
</span></a><a href=
"#hasTaskFunction" class=
"tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>has
<wbr/>Task
<wbr/>Function
</span></a><a href=
"#listTaskFunctionsProperties" class=
"tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>list
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
</span></a><a href=
"#messageListener" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>message
<wbr/>Listener
</span></a><a href=
"#removeTaskFunction" class=
"tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>remove
<wbr/>Task
<wbr/>Function
</span></a><a href=
"#run" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>run
</span></a><a href=
"#runAsync" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>run
<wbr/>Async
</span></a><a href=
"#runSync" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>run
<wbr/>Sync
</span></a><a href=
"#sendTaskFunctionsPropertiesToMainWorker" class=
"tsd-is-protected tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>send
<wbr/>Task
<wbr/>Functions
<wbr/>Properties
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span></a><a href=
"#sendToMainWorker" class=
"tsd-is-protected"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>send
<wbr/>To
<wbr/>Main
<wbr/>Worker
</span></a><a href=
"#setDefaultTaskFunction" class=
"tsd-is-inherited"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-2048"></use></svg><span>set
<wbr/>Default
<wbr/>Task
<wbr/>Function
</span></a></div></details></div></details></div><div class=
"site-menu"><nav class=
"tsd-navigation"><a href=
"../index.html"><svg class=
"tsd-kind-icon" viewBox=
"0 0 24 24"><use href=
"../assets/icons.svg#icon-1"></use></svg><span>poolifier - v4.0
.15</span></a><ul class=
"tsd-small-nested-navigation" id=
"tsd-nav-container" data-base=
".."><li>Loading...
</li></ul></nav></div></div></div><footer><p class=
"tsd-generator">Generated using
<a href=
"https://typedoc.org/" target=
"_blank">TypeDoc
</a></p></footer><div class=
"overlay"></div></body></html>