build(deps-dev): bump the regular group with 2 updates (#2655)
[poolifier.git] / docs / classes / AbstractPool.html
CommitLineData
7da80359 1<!DOCTYPE html><html class="default" lang="en"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AbstractPool | poolifier - v4.4.4</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.4.4</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="AbstractPool.html">AbstractPool</a></li></ul><h1>Class AbstractPool&lt;Worker, Data, Response&gt;<code class="tsd-tag">Abstract</code></h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>Base class that implements some shared logic for all poolifier pools.</p>
86de0a2d
DB
2</div><div class="tsd-comment tsd-typography"></div></section> <section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="Worker" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Worker</span><span class="tsd-signature-keyword"> extends </span><a href="../interfaces/IWorker.html" class="tsd-signature-type tsd-kind-interface">IWorker</a></span><div class="tsd-comment tsd-typography"><p>Type of worker which manages this pool.</p>
3</div><div class="tsd-comment tsd-typography"></div></li><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 sent to the worker. This can only be structured-cloneable data.</p>
4</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 execution response. This can only be structured-cloneable data.</p>
7da80359 5</div><div class="tsd-comment tsd-typography"></div></li></ul></section> <section class="tsd-panel tsd-hierarchy"><h4>Hierarchy (<a href="../hierarchy.html#AbstractPool">view full</a>)</h4><ul class="tsd-hierarchy"><li><span class="target">AbstractPool</span><ul class="tsd-hierarchy"><li><a href="FixedClusterPool.html" class="tsd-signature-type tsd-kind-class">FixedClusterPool</a></li><li><a href="FixedThreadPool.html" class="tsd-signature-type tsd-kind-class">FixedThreadPool</a></li></ul></li></ul></section><section class="tsd-panel"><h4>Implements</h4><ul class="tsd-hierarchy"><li><a href="../interfaces/IPool.html" class="tsd-signature-type tsd-kind-interface">IPool</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L80">src/pools/abstract-pool.ts:80</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="AbstractPool.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>
224d0081 6</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="AbstractPool.html#emitter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>emitter?</span></a>
86de0a2d
DB
7<a href="AbstractPool.html#filePath" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>file<wbr/>Path</span></a>
8<a href="AbstractPool.html#maximumNumberOfWorkers" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers?</span></a>
9<a href="AbstractPool.html#minimumNumberOfWorkers" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span></a>
10<a href="AbstractPool.html#opts" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>opts</span></a>
11<a href="AbstractPool.html#promiseResponseMap" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>promise<wbr/>Response<wbr/>Map</span></a>
50b4c8bb 12<a href="AbstractPool.html#workerChoiceStrategiesContext" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategies<wbr/>Context?</span></a>
86de0a2d 13<a href="AbstractPool.html#workerNodes" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Nodes</span></a>
f948bb3e
DB
14</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Accessors</h3><div class="tsd-index-list"><a href="AbstractPool.html#backPressure" 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>back<wbr/>Pressure</span></a>
15<a href="AbstractPool.html#busy" 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>busy</span></a>
86de0a2d 16<a href="AbstractPool.html#info" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>info</span></a>
86de0a2d 17<a href="AbstractPool.html#type" 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>type</span></a>
86de0a2d
DB
18<a href="AbstractPool.html#worker-2" 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>worker</span></a>
19</div></section><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="AbstractPool.html#addTaskFunction" class="tsd-index-link"><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>
86de0a2d
DB
20<a href="AbstractPool.html#afterTaskExecutionHook" 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>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a>
21<a href="AbstractPool.html#afterWorkerNodeSetup" 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>after<wbr/>Worker<wbr/>Node<wbr/>Setup</span></a>
22<a href="AbstractPool.html#beforeTaskExecutionHook" 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>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a>
86de0a2d 23<a href="AbstractPool.html#checkAndEmitDynamicWorkerCreationEvents" 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>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span></a>
bc407dc6 24<a href="AbstractPool.html#checkAndEmitDynamicWorkerDestructionEvents" 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>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Destruction<wbr/>Events</span></a>
86de0a2d
DB
25<a href="AbstractPool.html#createAndSetupDynamicWorkerNode" 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>create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span></a>
26<a href="AbstractPool.html#createAndSetupWorkerNode" 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>create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span></a>
86de0a2d
DB
27<a href="AbstractPool.html#deregisterWorkerMessageListener" 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>deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
28<a href="AbstractPool.html#destroy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a>
29<a href="AbstractPool.html#destroyWorkerNode" 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>destroy<wbr/>Worker<wbr/>Node</span></a>
30<a href="AbstractPool.html#enableTasksQueue" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enable<wbr/>Tasks<wbr/>Queue</span></a>
86de0a2d 31<a href="AbstractPool.html#execute" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>execute</span></a>
86de0a2d
DB
32<a href="AbstractPool.html#flagWorkerNodeAsNotReady" 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>flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span></a>
33<a href="AbstractPool.html#flushTasksQueue" 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>flush<wbr/>Tasks<wbr/>Queue</span></a>
86de0a2d 34<a href="AbstractPool.html#getWorkerInfo" 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>get<wbr/>Worker<wbr/>Info</span></a>
86de0a2d 35<a href="AbstractPool.html#hasTaskFunction" class="tsd-index-link"><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>
f948bb3e 36<a href="AbstractPool.html#internalBackPressure" 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>internal<wbr/>Back<wbr/>Pressure</span></a>
86de0a2d
DB
37<a href="AbstractPool.html#internalBusy" 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>internal<wbr/>Busy</span></a>
38<a href="AbstractPool.html#isMain" 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>is<wbr/>Main</span></a>
50b4c8bb 39<a href="AbstractPool.html#listTaskFunctionsProperties" class="tsd-index-link"><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>
4ac8e928 40<a href="AbstractPool.html#mapExecute" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map<wbr/>Execute</span></a>
86de0a2d
DB
41<a href="AbstractPool.html#registerOnceWorkerMessageListener" 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>register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
42<a href="AbstractPool.html#registerWorkerMessageListener" 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>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a>
43<a href="AbstractPool.html#removeTaskFunction" class="tsd-index-link"><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>
86de0a2d 44<a href="AbstractPool.html#sendStartupMessageToWorker" 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/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span></a>
86de0a2d
DB
45<a href="AbstractPool.html#sendToWorker" 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/>Worker</span></a>
46<a href="AbstractPool.html#setDefaultTaskFunction" class="tsd-index-link"><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>
86de0a2d 47<a href="AbstractPool.html#setTasksQueueOptions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span></a>
b83ac2ad 48<a href="AbstractPool.html#setupHook" 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>setup<wbr/>Hook</span></a>
86de0a2d
DB
49<a href="AbstractPool.html#setWorkerChoiceStrategy" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a>
50<a href="AbstractPool.html#setWorkerChoiceStrategyOptions" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a>
86de0a2d 51<a href="AbstractPool.html#shallCreateDynamicWorker" 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>shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span></a>
86de0a2d 52<a href="AbstractPool.html#start" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start</span></a>
86de0a2d 53<a href="AbstractPool.html#workerMessageListener" 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>worker<wbr/>Message<wbr/>Listener</span></a>
224d0081 54</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_AbstractPool" class="tsd-anchor"></a><span class="tsd-kind-constructor-signature">new <wbr/>Abstract<wbr/>Pool</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">minimumNumberOfWorkers</span>, <span class="tsd-kind-parameter">filePath</span>, <span class="tsd-kind-parameter">opts</span>, <span class="tsd-kind-parameter">maximumNumberOfWorkers</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="AbstractPool.html" class="tsd-signature-type tsd-kind-class">AbstractPool</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_AbstractPool" 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 pool.</p>
86de0a2d
DB
55</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="constructor.new_AbstractPool.Worker-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Worker</span><span class="tsd-signature-keyword"> extends </span><a href="../interfaces/IWorker.html" class="tsd-signature-type tsd-kind-interface">IWorker</a></span></li><li><span><a id="constructor.new_AbstractPool.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_AbstractPool.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">minimumNumberOfWorkers</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Minimum number of workers that this pool manages.</p>
56</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">filePath</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Path to the worker file.</p>
57</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">opts</span>: <a href="../interfaces/PoolOptions.html" class="tsd-signature-type tsd-kind-interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>Options for the pool.</p>
224d0081 58</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">maximumNumberOfWorkers</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Maximum number of workers that this pool manages.</p>
7da80359 59</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="AbstractPool.html" class="tsd-signature-type tsd-kind-class">AbstractPool</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L446">src/pools/abstract-pool.ts:446</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"><a id="emitter" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Optional</code><span>emitter</span><a href="#emitter" 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">emitter</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">EventEmitterAsyncResource</span></div><div class="tsd-comment tsd-typography"><p>Pool event emitter integrated with async resource.
48c6ba05 60The async tracking tooling identifier is <code>poolifier:&lt;PoolType&gt;-&lt;WorkerType&gt;-pool</code>.</p>
6c525543 61<p>Events that can currently be listened to:</p>
62<ul>
41a50dfe 63<li><code>'ready'</code>: Emitted when the number of workers created in the pool has reached the minimum size expected and are ready. If the pool is dynamic with a minimum number of workers set to zero, this event is emitted when the pool is started.</li>
224d0081 64<li><code>'busy'</code>: Emitted when the number of workers created in the pool has reached the maximum size expected and are executing concurrently their tasks quota.</li>
f948bb3e 65<li><code>'busyEnd'</code>: Emitted when the number of workers created in the pool has reached the maximum size expected and are no longer executing concurrently their tasks quota.</li>
224d0081 66<li><code>'full'</code>: Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.</li>
bc407dc6 67<li><code>'fullEnd'</code>: Emitted when the pool is dynamic and the number of workers created has no longer reached the maximum size expected.</li>
224d0081
DB
68<li><code>'empty'</code>: Emitted when the pool is dynamic with a minimum number of workers set to zero and the number of workers has reached the minimum size expected.</li>
69<li><code>'destroy'</code>: Emitted when the pool is destroyed.</li>
70<li><code>'error'</code>: Emitted when an uncaught error occurs.</li>
71<li><code>'taskError'</code>: Emitted when an error occurs while executing a task.</li>
f948bb3e
DB
72<li><code>'backPressure'</code>: Emitted when the number of workers created in the pool has reached the maximum size expected and are back pressured (i.e. their tasks queue is full: queue size &gt;= maximum queue size).</li>
73<li><code>'backPressureEnd'</code>: Emitted when the number of workers created in the pool has reached the maximum size expected and are no longer back pressured (i.e. their tasks queue is no longer full: queue size &lt; maximum queue size).</li>
6c525543 74</ul>
7da80359
DB
75</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#emitter">emitter</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L434">src/pools/abstract-pool.ts:434</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="filePath" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>file<wbr/>Path</span><a href="#filePath" 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">file<wbr/>Path</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Path to the worker file.</p>
76</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L448">src/pools/abstract-pool.ts:448</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="maximumNumberOfWorkers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Optional</code> <code class="tsd-tag">Readonly</code><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span><a href="#maximumNumberOfWorkers" 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">maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Maximum number of workers that this pool manages.</p>
77</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L450">src/pools/abstract-pool.ts:450</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="minimumNumberOfWorkers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span><a href="#minimumNumberOfWorkers" 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">minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Minimum number of workers that this pool manages.</p>
78</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L447">src/pools/abstract-pool.ts:447</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="opts" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</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/PoolOptions.html" class="tsd-signature-type tsd-kind-interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Options for the pool.</p>
79</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L449">src/pools/abstract-pool.ts:449</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="promiseResponseMap" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>promise<wbr/>Response<wbr/>Map</span><a href="#promiseResponseMap" 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">promise<wbr/>Response<wbr/>Map</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">`</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">-</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">`</span><span class="tsd-signature-symbol">, </span><a href="../interfaces/PromiseResponseWrapper.html" class="tsd-signature-type tsd-kind-interface">PromiseResponseWrapper</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-comment tsd-typography"><p>The task execution response promise map:</p>
6c525543 80<ul>
81<li><code>key</code>: The message id of each submitted task.</li>
224d0081 82<li><code>value</code>: An object that contains task's worker node key, execution response promise resolve and reject callbacks, async resource.</li>
6c525543 83</ul>
84<p>When we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id.</p>
7da80359
DB
85</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L92">src/pools/abstract-pool.ts:92</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="workerChoiceStrategiesContext" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Optional</code><span>worker<wbr/>Choice<wbr/>Strategies<wbr/>Context</span><a href="#workerChoiceStrategiesContext" 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">worker<wbr/>Choice<wbr/>Strategies<wbr/>Context</span><span class="tsd-signature-symbol">?:</span> <a href="WorkerChoiceStrategiesContext.html" class="tsd-signature-type tsd-kind-class">WorkerChoiceStrategiesContext</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Worker choice strategies context referencing worker choice algorithms implementation.</p>
86</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L103">src/pools/abstract-pool.ts:103</a></li></ul></aside></section><section class="tsd-panel tsd-member"><a id="workerNodes" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Readonly</code> <code class="tsd-tag">Internal</code><span>worker<wbr/>Nodes</span><a href="#workerNodes" 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">worker<wbr/>Nodes</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/IWorkerNode.html" class="tsd-signature-type tsd-kind-interface">IWorkerNode</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Worker-1">Worker</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><div class="tsd-comment tsd-typography"><p>Pool worker nodes.</p>
87</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#workerNodes">workerNodes</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L437">src/pools/abstract-pool.ts:437</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="backPressure" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>back<wbr/>Pressure</span><a href="#backPressure" 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="backPressure.backPressure-1"><span class="tsd-signature-keyword">get</span> backPressure<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether the pool is back pressured or not.</p>
f948bb3e 88</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The pool back pressure boolean status.</p>
7da80359 89<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L2025">src/pools/abstract-pool.ts:2025</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="busy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>busy</span><a href="#busy" 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="busy.busy-1"><span class="tsd-signature-keyword">get</span> busy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Whether the pool is busy or not.</p>
627fc572 90</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>The pool busyness boolean status.</p>
7da80359
DB
91<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L2031">src/pools/abstract-pool.ts:2031</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="info" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>info</span><a href="#info" 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" id="info.info-1"><span class="tsd-signature-keyword">get</span> info<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/PoolInfo.html" class="tsd-signature-type tsd-kind-interface">PoolInfo</a></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>Pool information.</p>
92</div><h4 class="tsd-returns-title">Returns <a href="../interfaces/PoolInfo.html" class="tsd-signature-type tsd-kind-interface">PoolInfo</a></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#info">info</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L2034">src/pools/abstract-pool.ts:2034</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="type" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>type</span><a href="#type" 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="type.type-1"><span class="tsd-signature-keyword">get</span> type<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;fixed&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;dynamic&quot;</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The pool type.</p>
224d0081 93<p>If it is <code>'dynamic'</code>, it provides the <code>max</code> property.</p>
7da80359
DB
94</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">&quot;fixed&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;dynamic&quot;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L2359">src/pools/abstract-pool.ts:2359</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="worker-2" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>worker</span><a href="#worker-2" 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="worker-2.worker-3"><span class="tsd-signature-keyword">get</span> worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;cluster&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;thread&quot;</span></li><li class="tsd-description"><div class="tsd-comment tsd-typography"><p>The worker type.</p>
95</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">&quot;cluster&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;thread&quot;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L2388">src/pools/abstract-pool.ts:2388</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"><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"><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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><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-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.</p>
224d0081
DB
96</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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The task function.</p>
97</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>true</code> if the task function was added, <code>false</code> otherwise.</p>
7da80359 98<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#addTaskFunction">addTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1726">src/pools/abstract-pool.ts:1726</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="afterTaskExecutionHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span><a href="#afterTaskExecutionHook" 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="afterTaskExecutionHook.afterTaskExecutionHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">after<wbr/>Task<wbr/>Execution<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</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="#afterTaskExecutionHook.afterTaskExecutionHook-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>Hook executed after the worker task execution.
6c525543 99Can be overridden.</p>
86de0a2d
DB
100</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
101</div><div class="tsd-comment tsd-typography"></div></li><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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The received message.</p>
7da80359 102</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L502">src/pools/abstract-pool.ts:502</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="afterWorkerNodeSetup" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>after<wbr/>Worker<wbr/>Node<wbr/>Setup</span><a href="#afterWorkerNodeSetup" 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="afterWorkerNodeSetup.afterWorkerNodeSetup-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">after<wbr/>Worker<wbr/>Node<wbr/>Setup</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#afterWorkerNodeSetup.afterWorkerNodeSetup-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>Method hooked up after a worker node has been newly created.
030eb5a3 103Can be overridden.</p>
86de0a2d 104</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The newly created worker node key.</p>
7da80359 105</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L557">src/pools/abstract-pool.ts:557</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="beforeTaskExecutionHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span><a href="#beforeTaskExecutionHook" 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="beforeTaskExecutionHook.beforeTaskExecutionHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">before<wbr/>Task<wbr/>Execution<wbr/>Hook</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</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="#beforeTaskExecutionHook.beforeTaskExecutionHook-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>Hook executed before the worker task execution.
6c525543 106Can be overridden.</p>
86de0a2d
DB
107</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
108</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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The task to execute.</p>
7da80359
DB
109</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L589">src/pools/abstract-pool.ts:589</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="checkAndEmitDynamicWorkerCreationEvents" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span><a href="#checkAndEmitDynamicWorkerCreationEvents" 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="checkAndEmitDynamicWorkerCreationEvents.checkAndEmitDynamicWorkerCreationEvents-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</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="#checkAndEmitDynamicWorkerCreationEvents.checkAndEmitDynamicWorkerCreationEvents-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>Emits dynamic worker creation events.</p>
110</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L626">src/pools/abstract-pool.ts:626</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="checkAndEmitDynamicWorkerDestructionEvents" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Destruction<wbr/>Events</span><a href="#checkAndEmitDynamicWorkerDestructionEvents" 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="checkAndEmitDynamicWorkerDestructionEvents.checkAndEmitDynamicWorkerDestructionEvents-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Destruction<wbr/>Events</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="#checkAndEmitDynamicWorkerDestructionEvents.checkAndEmitDynamicWorkerDestructionEvents-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>Emits dynamic worker destruction events.</p>
111</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L631">src/pools/abstract-pool.ts:631</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="createAndSetupDynamicWorkerNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span><a href="#createAndSetupDynamicWorkerNode" 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="createAndSetupDynamicWorkerNode.createAndSetupDynamicWorkerNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span><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><a href="#createAndSetupDynamicWorkerNode.createAndSetupDynamicWorkerNode-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>Creates a new, completely set up dynamic worker node.</p>
f9fc489a 112</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>New, completely set up dynamic worker node key.</p>
7da80359 113<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L637">src/pools/abstract-pool.ts:637</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="createAndSetupWorkerNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span><a href="#createAndSetupWorkerNode" 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="createAndSetupWorkerNode.createAndSetupWorkerNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span><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><a href="#createAndSetupWorkerNode.createAndSetupWorkerNode-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>Creates a new, completely set up worker node.</p>
f9fc489a 114</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>New, completely set up worker node key.</p>
7da80359 115<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L692">src/pools/abstract-pool.ts:692</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="deregisterWorkerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#deregisterWorkerMessageListener" 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="deregisterWorkerMessageListener.deregisterWorkerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message">Message</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#deregisterWorkerMessageListener.deregisterWorkerMessageListener-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>Deregisters a listener callback on the worker given its worker node key.</p>
86de0a2d 116</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Message</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">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081 117</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
7da80359 118</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><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></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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#deregisterWorkerMessageListener.deregisterWorkerMessageListener-1.Message">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L756">src/pools/abstract-pool.ts:756</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="destroy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>destroy</span><a href="#destroy" 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="destroy.destroy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroy.destroy-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"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Inherit Doc"><h4 class="tsd-anchor-link"><a id="Inherit Doc" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#destroy">destroy</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1760">src/pools/abstract-pool.ts:1760</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="destroyWorkerNode" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>destroy<wbr/>Worker<wbr/>Node</span><a href="#destroyWorkerNode" 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="destroyWorkerNode.destroyWorkerNode-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">destroy<wbr/>Worker<wbr/>Node</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#destroyWorkerNode.destroyWorkerNode-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>Terminates the worker node given its worker node key.</p>
86de0a2d 119</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
7da80359 120</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L767">src/pools/abstract-pool.ts:767</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="enableTasksQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>enable<wbr/>Tasks<wbr/>Queue</span><a href="#enableTasksQueue" 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="enableTasksQueue.enableTasksQueue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">enable<wbr/>Tasks<wbr/>Queue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">enable</span>, <span class="tsd-kind-parameter">tasksQueueOptions</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="#enableTasksQueue.enableTasksQueue-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">enable</span>: <span class="tsd-signature-type">boolean</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">tasksQueueOptions</span>: <a href="../interfaces/TasksQueueOptions.html" class="tsd-signature-type tsd-kind-interface">TasksQueueOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Inherit Doc"><h4 class="tsd-anchor-link"><a id="Inherit Doc-1" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#enableTasksQueue">enableTasksQueue</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1787">src/pools/abstract-pool.ts:1787</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="execute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>execute</span><a href="#execute" 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="execute.execute-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">execute</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">transferList</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span><a href="#execute.execute-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><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">data</span>: <a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a></span><div class="tsd-comment tsd-typography"><p>The optional task input data for the specified task function. This can only be structured-cloneable data.</p>
224d0081
DB
121</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The optional name of the task function to execute. If not specified, the default task function will be executed.</p>
122</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">transferList</span>: <span class="tsd-signature-keyword">readonly </span><span class="tsd-signature-type">TransferListItem</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the chosen pool's worker_threads worker and they should not be used in the main thread afterwards.</p>
123</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise with a task function response that will be fulfilled when the task is completed.</p>
7da80359 124<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#execute">execute</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1801">src/pools/abstract-pool.ts:1801</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="flagWorkerNodeAsNotReady" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span><a href="#flagWorkerNodeAsNotReady" 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="flagWorkerNodeAsNotReady.flagWorkerNodeAsNotReady-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#flagWorkerNodeAsNotReady.flagWorkerNodeAsNotReady-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">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L784">src/pools/abstract-pool.ts:784</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="flushTasksQueue" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>flush<wbr/>Tasks<wbr/>Queue</span><a href="#flushTasksQueue" 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="flushTasksQueue.flushTasksQueue-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">flush<wbr/>Tasks<wbr/>Queue</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><a href="#flushTasksQueue.flushTasksQueue-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">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L791">src/pools/abstract-pool.ts:791</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="getWorkerInfo" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>get<wbr/>Worker<wbr/>Info</span><a href="#getWorkerInfo" 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="getWorkerInfo.getWorkerInfo-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">get<wbr/>Worker<wbr/>Info</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/WorkerInfo.html" class="tsd-signature-type tsd-kind-interface">WorkerInfo</a><a href="#getWorkerInfo.getWorkerInfo-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>Gets the worker information given its worker node key.</p>
86de0a2d 125</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
36df30dd 126</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/WorkerInfo.html" class="tsd-signature-type tsd-kind-interface">WorkerInfo</a></h4><p>The worker information.</p>
7da80359 127<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L807">src/pools/abstract-pool.ts:807</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><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"><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><span class="tsd-signature-type">boolean</span><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-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.</p>
224d0081 128</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the task function exists, <code>false</code> otherwise.</p>
7da80359 129<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#hasTaskFunction">hasTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1825">src/pools/abstract-pool.ts:1825</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="internalBackPressure" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>internal<wbr/>Back<wbr/>Pressure</span><a href="#internalBackPressure" 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="internalBackPressure.internalBackPressure-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">internal<wbr/>Back<wbr/>Pressure</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#internalBackPressure.internalBackPressure-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>Whether the worker nodes are back pressured or not.</p>
f948bb3e 130</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>Worker nodes back pressure boolean status.</p>
7da80359 131<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L815">src/pools/abstract-pool.ts:815</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="internalBusy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>internal<wbr/>Busy</span><a href="#internalBusy" 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="internalBusy.internalBusy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">internal<wbr/>Busy</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#internalBusy.internalBusy-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>Whether worker nodes are executing concurrently their tasks quota or not.</p>
f9fc489a 132</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>Worker nodes busyness boolean status.</p>
7da80359 133<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L831">src/pools/abstract-pool.ts:831</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="isMain" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</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><ul class="tsd-signatures tsd-is-protected"><li class="tsd-signature tsd-anchor-link"><a id="isMain.isMain-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">is<wbr/>Main</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#isMain.isMain-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 whether the worker is the main worker or not.</p>
772b5f23 134</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the worker is the main worker, <code>false</code> otherwise.</p>
7da80359
DB
135<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L845">src/pools/abstract-pool.ts:845</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><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"><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"><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 task functions available in this pool.</p>
136<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#listTaskFunctionsProperties">listTaskFunctionsProperties</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1832">src/pools/abstract-pool.ts:1832</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="mapExecute" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>map<wbr/>Execute</span><a href="#mapExecute" 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="mapExecute.mapExecute-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">map<wbr/>Execute</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">data</span>, <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">transferList</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#mapExecute.mapExecute-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">data</span>: <span class="tsd-signature-type">Iterable</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The tasks iterable input data for the specified task function. This can only be an iterable of structured-cloneable data.</p>
224d0081
DB
137</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The optional name of the task function to execute. If not specified, the default task function will be executed.</p>
138</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">transferList</span>: <span class="tsd-signature-keyword">readonly </span><span class="tsd-signature-type">TransferListItem</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the chosen pool's worker_threads worker and they should not be used in the main thread afterwards.</p>
139</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Promise with an array of task function responses that will be fulfilled when the tasks are completed.</p>
7da80359 140<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#mapExecute">mapExecute</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1845">src/pools/abstract-pool.ts:1845</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="registerOnceWorkerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#registerOnceWorkerMessageListener" 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="registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1">Message</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-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>Registers once a listener callback on the worker given its worker node key.</p>
86de0a2d 141</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Message</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">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081 142</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
7da80359 143</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><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></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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#registerOnceWorkerMessageListener.registerOnceWorkerMessageListener-1.Message-1">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L852">src/pools/abstract-pool.ts:852</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="registerWorkerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span><a href="#registerWorkerMessageListener" 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="registerWorkerMessageListener.registerWorkerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">register<wbr/>Worker<wbr/>Message<wbr/>Listener</span><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2">Message</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">listener</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#registerWorkerMessageListener.registerWorkerMessageListener-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>Registers a listener callback on the worker given its worker node key.</p>
86de0a2d 144</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span><a id="registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2" class="tsd-anchor"></a><span class="tsd-kind-type-parameter">Message</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">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
224d0081 145</div><div class="tsd-comment tsd-typography"></div></li><li><span><span class="tsd-kind-parameter">listener</span>: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">message</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></span><div class="tsd-comment tsd-typography"><p>The message listener callback.</p>
7da80359 146</div><div class="tsd-comment tsd-typography"></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature"><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></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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#registerWorkerMessageListener.registerWorkerMessageListener-1.Message-2">Message</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L864">src/pools/abstract-pool.ts:864</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><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"><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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><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-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.</p>
224d0081 147</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>true</code> if the task function was removed, <code>false</code> otherwise.</p>
7da80359 148<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#removeTaskFunction">removeTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1883">src/pools/abstract-pool.ts:1883</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="sendStartupMessageToWorker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>send<wbr/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span><a href="#sendStartupMessageToWorker" 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="sendStartupMessageToWorker.sendStartupMessageToWorker-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">send<wbr/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#sendStartupMessageToWorker.sendStartupMessageToWorker-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 the startup message to worker given its worker node key.</p>
86de0a2d 149</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
7da80359 150</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L875">src/pools/abstract-pool.ts:875</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="sendToWorker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>send<wbr/>To<wbr/>Worker</span><a href="#sendToWorker" 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="sendToWorker.sendToWorker-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">send<wbr/>To<wbr/>Worker</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerNodeKey</span>, <span class="tsd-kind-parameter">message</span>, <span class="tsd-kind-parameter">transferList</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="#sendToWorker.sendToWorker-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 worker given its worker node key.</p>
86de0a2d
DB
151</div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">workerNodeKey</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The worker node key.</p>
152</div><div class="tsd-comment tsd-typography"></div></li><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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Data-1">Data</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The message.</p>
224d0081 153</div><div class="tsd-comment tsd-typography"></div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">transferList</span>: <span class="tsd-signature-keyword">readonly </span><span class="tsd-signature-type">TransferListItem</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>The optional array of transferable objects.</p>
7da80359 154</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L883">src/pools/abstract-pool.ts:883</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><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"><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><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span><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-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.</p>
224d0081 155</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>true</code> if the default task function was set, <code>false</code> otherwise.</p>
7da80359 156<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#setDefaultTaskFunction">setDefaultTaskFunction</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1910">src/pools/abstract-pool.ts:1910</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="setTasksQueueOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span><a href="#setTasksQueueOptions" 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="setTasksQueueOptions.setTasksQueueOptions-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">tasksQueueOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span><a href="#setTasksQueueOptions.setTasksQueueOptions-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">tasksQueueOptions</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/TasksQueueOptions.html" class="tsd-signature-type tsd-kind-interface">TasksQueueOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Inherit Doc"><h4 class="tsd-anchor-link"><a id="Inherit Doc-2" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#setTasksQueueOptions">setTasksQueueOptions</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1921">src/pools/abstract-pool.ts:1921</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="setupHook" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code><span>setup<wbr/>Hook</span><a href="#setupHook" 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="setupHook.setupHook-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">setup<wbr/>Hook</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="#setupHook.setupHook-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>Setup hook to execute code before worker nodes are created in the abstract constructor.
030eb5a3 157Can be overridden.</p>
7da80359 158</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L893">src/pools/abstract-pool.ts:893</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="setWorkerChoiceStrategy" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span><a href="#setWorkerChoiceStrategy" 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="setWorkerChoiceStrategy.setWorkerChoiceStrategy-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerChoiceStrategy</span>, <span class="tsd-kind-parameter">workerChoiceStrategyOptions</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="#setWorkerChoiceStrategy.setWorkerChoiceStrategy-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">workerChoiceStrategy</span>: <br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;INTERLEAVED_WEIGHTED_ROUND_ROBIN&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;LEAST_BUSY&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;LEAST_ELU&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;LEAST_USED&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><br/><span>    </span><span class="tsd-signature-symbol">| </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span></span></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">workerChoiceStrategyOptions</span>: <a href="../interfaces/WorkerChoiceStrategyOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerChoiceStrategyOptions</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Inherit Doc"><h4 class="tsd-anchor-link"><a id="Inherit Doc-3" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#setWorkerChoiceStrategy">setWorkerChoiceStrategy</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1948">src/pools/abstract-pool.ts:1948</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="setWorkerChoiceStrategyOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><a href="#setWorkerChoiceStrategyOptions" 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="setWorkerChoiceStrategyOptions.setWorkerChoiceStrategyOptions-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">workerChoiceStrategyOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><a href="#setWorkerChoiceStrategyOptions.setWorkerChoiceStrategyOptions-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">workerChoiceStrategyOptions</span>: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/WorkerChoiceStrategyOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerChoiceStrategyOptions</a></span><div class="tsd-comment tsd-typography"><p>The worker choice strategy options.</p>
b83ac2ad 159</div><div class="tsd-comment tsd-typography"></div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> if the worker choice strategy options were set, <code>false</code> otherwise.</p>
7da80359 160<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#setWorkerChoiceStrategyOptions">setWorkerChoiceStrategyOptions</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L1979">src/pools/abstract-pool.ts:1979</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="shallCreateDynamicWorker" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Abstract</code><span>shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span><a href="#shallCreateDynamicWorker" 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="shallCreateDynamicWorker.shallCreateDynamicWorker-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">shall<wbr/>Create<wbr/>Dynamic<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">boolean</span><a href="#shallCreateDynamicWorker.shallCreateDynamicWorker-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>Conditions for dynamic worker creation.</p>
f9fc489a 161</div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p>Whether to create a dynamic worker or not.</p>
7da80359 162<div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L901">src/pools/abstract-pool.ts:901</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member"><a id="start" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>start</span><a href="#start" 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="start.start-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">start</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="#start.start-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"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-Inherit Doc"><h4 class="tsd-anchor-link"><a id="Inherit Doc-4" class="tsd-anchor"></a>Inherit Doc<a href="#Inherit Doc-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/IPool.html">IPool</a>.<a href="../interfaces/IPool.html#start">start</a></p><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L2004">src/pools/abstract-pool.ts:2004</a></li></ul></aside></li></ul></section><section class="tsd-panel tsd-member tsd-is-protected"><a id="workerMessageListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag">Protected</code> <code class="tsd-tag">Readonly</code><span>worker<wbr/>Message<wbr/>Listener</span><a href="#workerMessageListener" 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="workerMessageListener.workerMessageListener-1" class="tsd-anchor"></a><span class="tsd-kind-call-signature">worker<wbr/>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="#workerMessageListener.workerMessageListener-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>This method is the message listener registered on each worker.</p>
4ac8e928 163</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">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="AbstractPool.html#constructor.new_AbstractPool.Response-1">Response</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></span><div class="tsd-comment tsd-typography"><p>The message received from the worker.</p>
7da80359 164</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"><ul><li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0f078e852d9050b00348b2c81b0ff0697da4a336/src/pools/abstract-pool.ts#L113">src/pools/abstract-pool.ts:113</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="#emitter" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>emitter</span></a><a href="#filePath" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>file<wbr/>Path</span></a><a href="#maximumNumberOfWorkers" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span></a><a href="#minimumNumberOfWorkers" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span></a><a href="#opts" class="tsd-is-protected"><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="#promiseResponseMap" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>promise<wbr/>Response<wbr/>Map</span></a><a href="#workerChoiceStrategiesContext" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Choice<wbr/>Strategies<wbr/>Context</span></a><a href="#workerNodes" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Nodes</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="#backPressure" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>back<wbr/>Pressure</span></a><a href="#busy" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>busy</span></a><a href="#info" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>info</span></a><a href="#type" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>type</span></a><a href="#worker-2" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-262144"></use></svg><span>worker</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=""><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="#afterTaskExecutionHook" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>after<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a><a href="#afterWorkerNodeSetup" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>after<wbr/>Worker<wbr/>Node<wbr/>Setup</span></a><a href="#beforeTaskExecutionHook" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>before<wbr/>Task<wbr/>Execution<wbr/>Hook</span></a><a href="#checkAndEmitDynamicWorkerCreationEvents" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Creation<wbr/>Events</span></a><a href="#checkAndEmitDynamicWorkerDestructionEvents" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>check<wbr/>And<wbr/>Emit<wbr/>Dynamic<wbr/>Worker<wbr/>Destruction<wbr/>Events</span></a><a href="#createAndSetupDynamicWorkerNode" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Dynamic<wbr/>Worker<wbr/>Node</span></a><a href="#createAndSetupWorkerNode" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>And<wbr/>Setup<wbr/>Worker<wbr/>Node</span></a><a href="#deregisterWorkerMessageListener" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>deregister<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a><a href="#destroy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy</span></a><a href="#destroyWorkerNode" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>destroy<wbr/>Worker<wbr/>Node</span></a><a href="#enableTasksQueue" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>enable<wbr/>Tasks<wbr/>Queue</span></a><a href="#execute" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>execute</span></a><a href="#flagWorkerNodeAsNotReady" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flag<wbr/>Worker<wbr/>Node<wbr/>As<wbr/>Not<wbr/>Ready</span></a><a href="#flushTasksQueue" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>flush<wbr/>Tasks<wbr/>Queue</span></a><a href="#getWorkerInfo" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Worker<wbr/>Info</span></a><a href="#hasTaskFunction" class=""><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="#internalBackPressure" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>internal<wbr/>Back<wbr/>Pressure</span></a><a href="#internalBusy" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>internal<wbr/>Busy</span></a><a href="#isMain" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>is<wbr/>Main</span></a><a href="#listTaskFunctionsProperties" class=""><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="#mapExecute" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>map<wbr/>Execute</span></a><a href="#registerOnceWorkerMessageListener" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>register<wbr/>Once<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a><a href="#registerWorkerMessageListener" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>register<wbr/>Worker<wbr/>Message<wbr/>Listener</span></a><a href="#removeTaskFunction" class=""><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="#sendStartupMessageToWorker" 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/>Startup<wbr/>Message<wbr/>To<wbr/>Worker</span></a><a href="#sendToWorker" 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/>Worker</span></a><a href="#setDefaultTaskFunction" class=""><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><a href="#setTasksQueueOptions" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span></a><a href="#setupHook" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>setup<wbr/>Hook</span></a><a href="#setWorkerChoiceStrategy" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a><a href="#setWorkerChoiceStrategyOptions" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a><a href="#shallCreateDynamicWorker" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>shall<wbr/>Create<wbr/>Dynamic<wbr/>Worker</span></a><a href="#start" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>start</span></a><a href="#workerMessageListener" class="tsd-is-protected"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-2048"></use></svg><span>worker<wbr/>Message<wbr/>Listener</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.4.4</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>