You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
<!DOCTYPE html><htmlclass="default" lang="en" data-base="../"><head><metacharset="utf-8"/><metahttp-equiv="x-ua-compatible" content="IE=edge"/><title>DynamicThreadPool | poolifier - v5.3.2</title><metaname="description" content="Documentation for poolifier"/><metaname="viewport" content="width=device-width, initial-scale=1"/><linkrel="stylesheet" href="../assets/style.css"/><linkrel="stylesheet" href="../assets/highlight.css"/><scriptdefersrc="../assets/main.js"></script><scriptasyncsrc="../assets/icons.js" id="tsd-icons-script"></script><scriptasyncsrc="../assets/search.js" id="tsd-search-script"></script><scriptasyncsrc="../assets/navigation.js" id="tsd-nav-script"></script><scriptasyncsrc="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme=localStorage.getItem("tsd-theme")||"os";document.body.style.display="none";setTimeout(()=>window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><headerclass="tsd-page-toolbar"><divclass="tsd-toolbar-contents container"><ahref="../index.html" class="title">poolifier - v5.3.2</a><divid="tsd-toolbar-links"></div><buttonid="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svgwidth="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><usehref="../assets/icons.svg#icon-search"></use></svg></button><dialogid="tsd-search" aria-label="Search"><inputrole="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ulrole="listbox" id="tsd-search-results"></ul><divid="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><ahref="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svgwidth="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><usehref="../assets/icons.svg#icon-menu"></use></svg></a></div></header><divclass="container container-main"><divclass="col-content"><divclass="tsd-page-title"><ulclass="tsd-breadcrumb" aria-label="Breadcrumb"><li><ahref="../modules/src.html">src</a></li><li><ahref="" aria-current="page">DynamicThreadPool</a></li></ul><h1>Class DynamicThreadPool<Data, Response></h1></div><sectionclass="tsd-panel tsd-comment"><divclass="tsd-comment tsd-typography"><p>A thread pool with a dynamic number of threads, but a guaranteed minimum number of threads.</p>
<p>This thread pool creates new threads when the others are busy, up to the maximum number of threads.
When the maximum number of threads is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool's <code>emitter</code>.</p>
</div></div></section><sectionclass="tsd-panel"><h4>Type Parameters</h4><ulclass="tsd-type-parameter-list"><li><spanid="data"><spanclass="tsd-kind-type-parameter">Data</span> = <spanclass="tsd-signature-type">unknown</span></span><divclass="tsd-comment tsd-typography"><p>Type of data sent to the worker. This can only be structured-cloneable data.</p>
</div></li><li><spanid="response"><spanclass="tsd-kind-type-parameter">Response</span> = <spanclass="tsd-signature-type">unknown</span></span><divclass="tsd-comment tsd-typography"><p>Type of execution response. This can only be structured-cloneable data.</p>
</div><sectionclass="tsd-panel"><h4>Type Parameters</h4><ulclass="tsd-type-parameter-list"><li><spanid="constructordynamicthreadpooldata"><spanclass="tsd-kind-type-parameter">Data</span> = <spanclass="tsd-signature-type">unknown</span></span><divclass="tsd-comment tsd-typography"><p>Type of data sent to the worker. This can only be structured-cloneable data.</p>
</div></li><li><spanid="constructordynamicthreadpoolresponse"><spanclass="tsd-kind-type-parameter">Response</span> = <spanclass="tsd-signature-type">unknown</span></span><divclass="tsd-comment tsd-typography"><p>Type of execution response. This can only be structured-cloneable data.</p>
</div></li></ul></section><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">min</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>Minimum number of threads which are always active.</p>
</div></li><li><span><spanclass="tsd-kind-parameter">max</span>: <spanclass="tsd-signature-type">number</span></span><divclass="tsd-comment tsd-typography"><p>Maximum number of threads that can be created by this pool.</p>
</div></li><li><span><spanclass="tsd-kind-parameter">filePath</span>: <spanclass="tsd-signature-type">string</span></span><divclass="tsd-comment tsd-typography"><p>Path to an implementation of a <code>ThreadWorker</code> file, which can be relative or absolute.</p>
</div></li><li><span><spanclass="tsd-kind-parameter">opts</span>: <ahref="../types/src.ThreadPoolOptions.html" class="tsd-signature-type tsd-kind-type-alias">ThreadPoolOptions</a><spanclass="tsd-signature-symbol"> = {}</span></span><divclass="tsd-comment tsd-typography"><p>Options for this dynamic thread pool.</p>
</div></li></ul></div><h4class="tsd-returns-title">Returns <ahref="" class="tsd-signature-type tsd-kind-class">DynamicThreadPool</a><spanclass="tsd-signature-symbol"><</span><aclass="tsd-signature-type tsd-kind-type-parameter" href="#data">Data</a><spanclass="tsd-signature-symbol">,</span><aclass="tsd-signature-type tsd-kind-type-parameter" href="#response">Response</a><spanclass="tsd-signature-symbol">></span></h4><asideclass="tsd-sources"><p>Overrides <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#constructor">constructor</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/thread/dynamic.ts#L73">src/pools/thread/dynamic.ts:73</a></li></ul></aside></div></li></ul></section></section></details><detailsclass="tsd-panel-group tsd-member-group tsd-accordion" open><summaryclass="tsd-accordion-summary" data-key="section-Properties"><svgwidth="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><usehref="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="destroying"><codeclass="tsd-tag">Protected</code><span>destroying</span><ahref="#destroying" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">destroying</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>Whether the pool is destroying or not.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#destroying">destroying</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L377">src/pools/abstract-pool.ts:377</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><h3class="tsd-anchor-link" id="emitter"><codeclass="tsd-tag">Optional</code><span>emitter</span><ahref="#emitter" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">emitter</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">EventEmitterAsyncResource</span></div><divclass="tsd-comment tsd-typography"><divclass="tsd-tag-inheritDoc"><h4class="tsd-anchor-link" id="inherit-doc">Inherit Doc<ahref="#inherit-doc" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#emitter">emitter</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L87">src/pools/abstract-pool.ts:87</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="filepath"><codeclass="tsd-tag">Protected</code><codeclass="tsd-tag">Readonly</code><span>file<wbr/>Path</span><ahref="#filepath" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">filePath</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">string</span></div><divclass="tsd-comment tsd-typography"><p>Path to the worker file.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#filepath">filePath</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L527">src/pools/abstract-pool.ts:527</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="maximumnumberofworkers"><codeclass="tsd-tag">Protected</code><codeclass="tsd-tag">Optional</code><codeclass="tsd-tag">Readonly</code><span>maximum<wbr/>Number<wbr/>Of<wbr/>Workers</span><ahref="#maximumnumberofworkers" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">maximumNumberOfWorkers</span><spanclass="tsd-signature-symbol">?:</span><spanclass="tsd-signature-type">number</span></div><divclass="tsd-comment tsd-typography"><p>Maximum number of workers that this pool manages.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#maximumnumberofworkers">maximumNumberOfWorkers</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L529">src/pools/abstract-pool.ts:529</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="minimumnumberofworkers"><codeclass="tsd-tag">Protected</code><codeclass="tsd-tag">Readonly</code><span>minimum<wbr/>Number<wbr/>Of<wbr/>Workers</span><ahref="#minimumnumberofworkers" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">minimumNumberOfWorkers</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">number</span></div><divclass="tsd-comment tsd-typography"><p>Minimum number of workers that this pool manages.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#minimumnumberofworkers">minimumNumberOfWorkers</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L526">src/pools/abstract-pool.ts:526</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="opts"><codeclass="tsd-tag">Protected</code><codeclass="tsd-tag">Readonly</code><span>opts</span><ahref="#opts" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">opts</span><spanclass="tsd-signature-symbol">:</span><ahref="../interfaces/src.PoolOptions.html" class="tsd-signature-type tsd-kind-interface">PoolOptions</a><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">Worker</span><spanclass="tsd-signature-symbol">></span></div><divclass="tsd-comment tsd-typography"><p>Options for the pool.</p>
<li><code>key</code>: The message id of each submitted task.</li>
<li><code>value</code>: An object that contains task's worker node key, execution response promise resolve and reject callbacks, async resource.</li>
</ul>
<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>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#promiseresponsemap">promiseResponseMap</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L386">src/pools/abstract-pool.ts:386</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="started"><codeclass="tsd-tag">Protected</code><span>started</span><ahref="#started" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">started</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>Whether the pool is started or not.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#started">started</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L397">src/pools/abstract-pool.ts:397</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="starting"><codeclass="tsd-tag">Protected</code><span>starting</span><ahref="#starting" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">starting</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-comment tsd-typography"><p>Whether the pool is starting or not.</p>
</div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#workerchoicestrategiescontext">workerChoiceStrategiesContext</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L407">src/pools/abstract-pool.ts:407</a></li></ul></aside></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><h3class="tsd-anchor-link" id="workernodes"><codeclass="tsd-tag">Readonly</code><span>worker<wbr/>Nodes</span><ahref="#workernodes" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><divclass="tsd-signature"><spanclass="tsd-kind-property">workerNodes</span><spanclass="tsd-signature-symbol">:</span><ahref="../interfaces/src.IWorkerNode.html" class="tsd-signature-type tsd-kind-interface">IWorkerNode</a><spanclass="tsd-signature-symbol"><</span><spanclass="tsd-signature-type">Worker</span><spanclass="tsd-signature-symbol">,</span><aclass="tsd-signature-type tsd-kind-type-parameter" href="#data">Data</a><spanclass="tsd-signature-symbol">></span><spanclass="tsd-signature-symbol">[]</span><spanclass="tsd-signature-symbol"> = []</span></div><divclass="tsd-comment tsd-typography"><divclass="tsd-tag-inheritDoc"><h4class="tsd-anchor-link" id="inherit-doc-1">Inherit Doc<ahref="#inherit-doc-1" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#workernodes">workerNodes</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L90">src/pools/abstract-pool.ts:90</a></li></ul></aside></section></section></details><detailsclass="tsd-panel-group tsd-member-group tsd-accordion" open><summaryclass="tsd-accordion-summary" data-key="section-Accessors"><svgwidth="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><usehref="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Accessors</h2></summary><section><sectionclass="tsd-panel tsd-member tsd-is-protected"><h3class="tsd-anchor-link" id="backpressure"><codeclass="tsd-tag">Protected</code><span>back<wbr/>Pressure</span><ahref="#backpressure" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-protected"><li><divclass="tsd-signature" id="backpressurebackpressure"><spanclass="tsd-signature-keyword">get</span><spanclass="tsd-kind-get-signature">backPressure</span><spanclass="tsd-signature-symbol">()</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Whether the pool is back pressured or not.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p>The pool back pressure boolean status.</p>
<asideclass="tsd-sources"><p>Overrides FixedThreadPool.backPressure</p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/thread/dynamic.ts#L20">src/pools/thread/dynamic.ts:20</a></li></ul></aside></div></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-protected"><h3class="tsd-anchor-link" id="busy"><codeclass="tsd-tag">Protected</code><span>busy</span><ahref="#busy" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-protected"><li><divclass="tsd-signature" id="busybusy"><spanclass="tsd-signature-keyword">get</span><spanclass="tsd-kind-get-signature">busy</span><spanclass="tsd-signature-symbol">()</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">boolean</span></div><divclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Whether the pool is busy or not.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p>The pool busyness boolean status.</p>
<asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#internalbusy">internalBusy</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L1248">src/pools/abstract-pool.ts:1248</a></li></ul></aside></div></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="ismain"><codeclass="tsd-tag">Protected</code><span>is<wbr/>Main</span><ahref="#ismain" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-protected tsd-is-inherited"><liclass="tsd-is-inherited"><divclass="tsd-signature tsd-anchor-link" id="ismain-1"><spanclass="tsd-kind-call-signature">isMain</span><spanclass="tsd-signature-symbol">()</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">boolean</span><ahref="#ismain-1" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></div><divclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>Returns whether the worker is the main worker or not.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p><code>true</code> if the worker is the main worker, <code>false</code> otherwise.</p>
</div><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">boolean</span></h4><p>Whether to create a dynamic worker or not.</p>
<asideclass="tsd-sources"><p>Overrides <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#shallcreatedynamicworker">shallCreateDynamicWorker</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/thread/dynamic.ts#L119">src/pools/thread/dynamic.ts:119</a></li></ul></aside></div></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-inherited"><h3class="tsd-anchor-link" id="start"><span>start</span><ahref="#start" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-inherited"><liclass="tsd-is-inherited"><divclass="tsd-signature tsd-anchor-link" id="start-1"><spanclass="tsd-kind-call-signature">start</span><spanclass="tsd-signature-symbol">()</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">void</span><ahref="#start-1" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></div><divclass="tsd-description"><h4class="tsd-returns-title">Returns <spanclass="tsd-signature-type">void</span></h4><divclass="tsd-comment tsd-typography"><divclass="tsd-tag-inheritDoc"><h4class="tsd-anchor-link" id="inherit-doc-15">Inherit Doc<ahref="#inherit-doc-15" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h4></div></div><asideclass="tsd-sources"><p>Inherited from <ahref="src.FixedThreadPool.html">FixedThreadPool</a>.<ahref="src.FixedThreadPool.html#start">start</a></p><ul><li>Defined in <ahref="https://github.com/poolifier/poolifier/blob/81b5403d5024050a872b571c88bc95be1a72ff68/src/pools/abstract-pool.ts#L898">src/pools/abstract-pool.ts:898</a></li></ul></aside></div></li></ul></section><sectionclass="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><h3class="tsd-anchor-link" id="workermessagelistener"><codeclass="tsd-tag">Protected</code><codeclass="tsd-tag">Readonly</code><span>worker<wbr/>Message<wbr/>Listener</span><ahref="#workermessagelistener" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ulclass="tsd-signatures tsd-is-protected tsd-is-inherited"><liclass="tsd-is-inherited"><divclass="tsd-signature tsd-anchor-link" id="workermessagelistener-1"><spanclass="tsd-kind-call-signature">workerMessageListener</span><spanclass="tsd-signature-symbol">(</span><spanclass="tsd-kind-parameter">message</span><spanclass="tsd-signature-symbol">:</span><ahref="../interfaces/src.MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><spanclass="tsd-signature-symbol"><</span><aclass="tsd-signature-type tsd-kind-type-parameter" href="#response">Response</a><spanclass="tsd-signature-symbol">></span><spanclass="tsd-signature-symbol">)</span><spanclass="tsd-signature-symbol">:</span><spanclass="tsd-signature-type">void</span><ahref="#workermessagelistener-1" aria-label="Permalink" class="tsd-anchor-icon"><svgviewBox="0 0 24 24" aria-hidden="true"><usehref="../assets/icons.svg#icon-anchor"></use></svg></a></div><divclass="tsd-description"><divclass="tsd-comment tsd-typography"><p>This method is the message listener registered on each worker.</p>
</div><divclass="tsd-parameters"><h4class="tsd-parameters-title">Parameters</h4><ulclass="tsd-parameter-list"><li><span><spanclass="tsd-kind-parameter">message</span>: <ahref="../interfaces/src.MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><spanclass="tsd-signature-symbol"><</span><aclass="tsd-signature-type tsd-kind-type-parameter" href="#response">Response</a><spanclass="tsd-signature-symbol">></span></span><divclass="tsd-comment tsd-typography"><p>The message received from the worker.</p>