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