chore: generate documentation
[poolifier.git] / docs / classes / ThreadWorker.html
index fb444a083fbc36b2df2c7481293e5b91861982b1..62198283e49923fb181a0cf522035b8304ea8afc 100644 (file)
@@ -44,7 +44,7 @@ but the minimum number of workers will be guaranteed.</p>
 <ul class="tsd-hierarchy">
 <li><span class="target">ThreadWorker</span></li></ul></li></ul></section><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/thread-worker.ts#L21">src/worker/thread-worker.ts:21</a></li></ul></aside>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/thread-worker.ts#L25">src/worker/thread-worker.ts:25</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-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -61,6 +61,7 @@ but the minimum number of workers will be guaranteed.</p>
 <a href="ThreadWorker.html#lastTaskTimestamp" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>last<wbr/>Task<wbr/>Timestamp</span></a>
 <a href="ThreadWorker.html#mainWorker" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>main<wbr/>Worker</span></a>
 <a href="ThreadWorker.html#opts" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>opts</span></a>
+<a href="ThreadWorker.html#taskFunctions" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>task<wbr/>Functions</span></a>
 </div></section>
 <section class="tsd-index-section">
 <h3 class="tsd-index-heading">Methods</h3>
@@ -71,9 +72,9 @@ but the minimum number of workers will be guaranteed.</p>
 <a href="ThreadWorker.html#getMainWorker" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Main<wbr/>Worker</span></a>
 <a href="ThreadWorker.html#handleError" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>handle<wbr/>Error</span></a>
 <a href="ThreadWorker.html#messageListener" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>message<wbr/>Listener</span></a>
-<a href="ThreadWorker.html#run" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run</span></a>
 <a href="ThreadWorker.html#runAsync" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run<wbr/>Async</span></a>
 <a href="ThreadWorker.html#runInAsyncScope" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run<wbr/>In<wbr/>Async<wbr/>Scope</span></a>
+<a href="ThreadWorker.html#runSync" class="tsd-index-link tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run<wbr/>Sync</span></a>
 <a href="ThreadWorker.html#sendToMainWorker" class="tsd-index-link tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Main<wbr/>Worker</span></a>
 <a href="ThreadWorker.html#triggerAsyncId" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>trigger<wbr/>Async<wbr/>Id</span></a>
 <a href="ThreadWorker.html#bind-2" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>bind</span></a>
@@ -83,7 +84,7 @@ but the minimum number of workers will be guaranteed.</p>
 <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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></h3>
 <ul class="tsd-signatures">
-<li class="tsd-signature tsd-anchor-link" id="constructor.new_ThreadWorker"><span class="tsd-kind-constructor-signature">new <wbr/>Thread<wbr/>Worker</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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="ThreadWorker.html" class="tsd-signature-type tsd-kind-class">ThreadWorker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_ThreadWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
+<li class="tsd-signature tsd-anchor-link" id="constructor.new_ThreadWorker"><span class="tsd-kind-constructor-signature">new <wbr/>Thread<wbr/>Worker</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">taskFunctions</span>, <span class="tsd-kind-parameter">opts</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ThreadWorker.html" class="tsd-signature-type tsd-kind-class">ThreadWorker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><a href="#constructor.new_ThreadWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
 <li class="tsd-description">
 <div class="tsd-comment tsd-typography"><p>Constructs a new poolifier thread worker.</p>
 </div>
@@ -98,8 +99,8 @@ but the minimum number of workers will be guaranteed.</p>
 <h4 class="tsd-parameters-title">Parameters</h4>
 <ul class="tsd-parameter-list">
 <li>
-<h5><span class="tsd-kind-parameter">fn</span>: <a href="../types/WorkerFunction.html" class="tsd-signature-type tsd-kind-type-alias">WorkerFunction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h5>
-<div class="tsd-comment tsd-typography"><p>Function processed by the worker when the pool&#39;s <code>execution</code> function is invoked.</p>
+<h5><span class="tsd-kind-parameter">taskFunctions</span>: <a href="../types/WorkerFunction.html" class="tsd-signature-type tsd-kind-type-alias">WorkerFunction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</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">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h5>
+<div class="tsd-comment tsd-typography"><p>Task function(s) processed by the worker when the pool&#39;s <code>execution</code> function is invoked.</p>
 </div></li>
 <li>
 <h5><span class="tsd-kind-parameter">opts</span>: <a href="../interfaces/WorkerOptions.html" class="tsd-signature-type tsd-kind-interface">WorkerOptions</a><span class="tsd-signature-symbol"> = {}</span></h5>
@@ -108,7 +109,7 @@ but the minimum number of workers will be guaranteed.</p>
 <h4 class="tsd-returns-title">Returns <a href="ThreadWorker.html" class="tsd-signature-type tsd-kind-class">ThreadWorker</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
 <p>Overrides <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#constructor">constructor</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/thread-worker.ts#L31">src/worker/thread-worker.ts:31</a></li></ul></aside></li></ul></section></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/thread-worker.ts#L35">src/worker/thread-worker.ts:35</a></li></ul></aside></li></ul></section></section>
 <section class="tsd-panel-group tsd-member-group">
 <h2>Properties</h2>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="aliveInterval" class="tsd-anchor"></a>
@@ -118,7 +119,7 @@ but the minimum number of workers will be guaranteed.</p>
 </div><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#aliveInterval">aliveInterval</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L36">src/worker/abstract-worker.ts:36</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L42">src/worker/abstract-worker.ts:42</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="isMain" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>is<wbr/>Main</span><a href="#isMain" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></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">boolean</span></div>
@@ -126,7 +127,7 @@ but the minimum number of workers will be guaranteed.</p>
 </div><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#isMain">isMain</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L48">src/worker/abstract-worker.ts:48</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L54">src/worker/abstract-worker.ts:54</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="lastTaskTimestamp" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>last<wbr/>Task<wbr/>Timestamp</span><a href="#lastTaskTimestamp" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></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>
@@ -134,7 +135,7 @@ but the minimum number of workers will be guaranteed.</p>
 </div><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#lastTaskTimestamp">lastTaskTimestamp</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L32">src/worker/abstract-worker.ts:32</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L38">src/worker/abstract-worker.ts:38</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="mainWorker" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>main<wbr/>Worker</span><a href="#mainWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <div class="tsd-signature"><span class="tsd-kind-property">main<wbr/>Worker</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">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">MessagePort</span></div>
@@ -142,7 +143,7 @@ but the minimum number of workers will be guaranteed.</p>
 </div><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#mainWorker">mainWorker</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L50">src/worker/abstract-worker.ts:50</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L58">src/worker/abstract-worker.ts:58</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="opts" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>opts</span><a href="#opts" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></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"> = ...</span></div>
@@ -150,7 +151,15 @@ but the minimum number of workers will be guaranteed.</p>
 </div><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#opts">opts</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L51">src/worker/abstract-worker.ts:51</a></li></ul></aside></section></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L59">src/worker/abstract-worker.ts:59</a></li></ul></aside></section>
+<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="taskFunctions" class="tsd-anchor"></a>
+<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>task<wbr/>Functions</span><a href="#taskFunctions" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></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">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="../types/WorkerFunction.html" class="tsd-signature-type tsd-kind-type-alias">WorkerFunction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span></div>
+<div class="tsd-comment tsd-typography"><p>Task function(s) processed by the worker when the pool&#39;s <code>execution</code> function is invoked.</p>
+</div><aside class="tsd-sources">
+<p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#taskFunctions">taskFunctions</a></p>
+<ul>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L34">src/worker/abstract-worker.ts:34</a></li></ul></aside></section></section>
 <section class="tsd-panel-group tsd-member-group">
 <h2>Methods</h2>
 <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="asyncId" class="tsd-anchor"></a>
@@ -163,15 +172,13 @@ but the minimum number of workers will be guaranteed.</p>
 <aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#asyncId">asyncId</a></p>
 <ul>
-<li>Defined in node_modules/.pnpm/@types+node@18.16.0/node_modules/@types/node/async_hooks.d.ts:315</li></ul></aside></li></ul></section>
+<li>Defined in node_modules/.pnpm/@types+node@20.1.0/node_modules/@types/node/async_hooks.d.ts:312</li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="bind" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>bind</span><a href="#bind" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-inherited tsd-is-external">
-<li class="tsd-signature tsd-anchor-link" id="bind.bind-1"><span class="tsd-kind-call-signature">bind</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">asyncResource</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">AsyncResource</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><a href="#bind.bind-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
+<li class="tsd-signature tsd-anchor-link" id="bind.bind-1"><span class="tsd-kind-call-signature">bind</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><a href="#bind.bind-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
 <li class="tsd-description">
 <div class="tsd-comment tsd-typography"><p>Binds the given function to execute to this <code>AsyncResource</code>&#39;s scope.</p>
-<p>The returned function will have an <code>asyncResource</code> property referencing
-the <code>AsyncResource</code> to which the function is bound.</p>
 
 <h3>Since</h3><p>v14.8.0, v12.19.0</p>
 </div>
@@ -187,10 +194,10 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 <h5><span class="tsd-kind-parameter">fn</span>: <span class="tsd-signature-type tsd-kind-type-parameter">Func</span></h5>
 <div class="tsd-comment tsd-typography"><p>The function to bind to the current <code>AsyncResource</code>.</p>
 </div></li></ul></div>
-<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">asyncResource</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">AsyncResource</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4><aside class="tsd-sources">
+<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">Func</span></h4><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#bind">bind</a></p>
 <ul>
-<li>Defined in node_modules/.pnpm/@types+node@18.16.0/node_modules/@types/node/async_hooks.d.ts:288</li></ul></aside></li></ul></section>
+<li>Defined in node_modules/.pnpm/@types+node@20.1.0/node_modules/@types/node/async_hooks.d.ts:287</li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="checkAlive" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>check<wbr/>Alive</span><a href="#checkAlive" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -201,7 +208,7 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#checkAlive">checkAlive</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L156">src/worker/abstract-worker.ts:156</a></li></ul></aside></li></ul></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L179">src/worker/abstract-worker.ts:179</a></li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="emitDestroy" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>emit<wbr/>Destroy</span><a href="#emitDestroy" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-inherited tsd-is-external">
@@ -216,7 +223,7 @@ never be called.</p>
 <aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#emitDestroy">emitDestroy</a></p>
 <ul>
-<li>Defined in node_modules/.pnpm/@types+node@18.16.0/node_modules/@types/node/async_hooks.d.ts:311</li></ul></aside></li></ul></section>
+<li>Defined in node_modules/.pnpm/@types+node@20.1.0/node_modules/@types/node/async_hooks.d.ts:308</li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="getMainWorker" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>get<wbr/>Main<wbr/>Worker</span><a href="#getMainWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -228,7 +235,7 @@ never be called.</p>
 <aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#getMainWorker">getMainWorker</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L139">src/worker/abstract-worker.ts:139</a></li></ul></aside></li></ul></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L162">src/worker/abstract-worker.ts:162</a></li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="handleError" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>handle<wbr/>Error</span><a href="#handleError" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -247,11 +254,11 @@ never be called.</p>
 <aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#handleError">handleError</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L171">src/worker/abstract-worker.ts:171</a></li></ul></aside></li></ul></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L194">src/worker/abstract-worker.ts:194</a></li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="messageListener" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>message<wbr/>Listener</span><a href="#messageListener" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
-<li class="tsd-signature tsd-anchor-link" id="messageListener.messageListener-1"><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-kind-parameter">fn</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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
+<li class="tsd-signature tsd-anchor-link" id="messageListener.messageListener-1"><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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
 <li class="tsd-description">
 <div class="tsd-comment tsd-typography"><p>Worker message listener.</p>
 </div>
@@ -261,37 +268,11 @@ never be called.</p>
 <li>
 <h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type ">MessagePort</span><span class="tsd-signature-symbol">&gt;</span></h5>
 <div class="tsd-comment tsd-typography"><p>Message received.</p>
-</div></li>
-<li>
-<h5><span class="tsd-kind-parameter">fn</span>: <a href="../types/WorkerFunction.html" class="tsd-signature-type tsd-kind-type-alias">WorkerFunction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h5>
-<div class="tsd-comment tsd-typography"><p>Function processed by the worker when the pool&#39;s <code>execution</code> function is invoked.</p>
 </div></li></ul></div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#messageListener">messageListener</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L113">src/worker/abstract-worker.ts:113</a></li></ul></aside></li></ul></section>
-<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="run" class="tsd-anchor"></a>
-<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>run</span><a href="#run" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
-<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
-<li class="tsd-signature tsd-anchor-link" id="run.run-1"><span class="tsd-kind-call-signature">run</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</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="#run.run-1" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
-<li class="tsd-description">
-<div class="tsd-comment tsd-typography"><p>Runs the given function synchronously.</p>
-</div>
-<div class="tsd-parameters">
-<h4 class="tsd-parameters-title">Parameters</h4>
-<ul class="tsd-parameter-list">
-<li>
-<h5><span class="tsd-kind-parameter">fn</span>: <a href="../types/WorkerSyncFunction.html" class="tsd-signature-type tsd-kind-type-alias">WorkerSyncFunction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h5>
-<div class="tsd-comment tsd-typography"><p>Function that will be executed.</p>
-</div></li>
-<li>
-<h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
-<div class="tsd-comment tsd-typography"><p>Input data for the given function.</p>
-</div></li></ul></div>
-<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
-<p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#run">run</a></p>
-<ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L181">src/worker/abstract-worker.ts:181</a></li></ul></aside></li></ul></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L138">src/worker/abstract-worker.ts:138</a></li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="runAsync" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>run<wbr/>Async</span><a href="#runAsync" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
@@ -307,13 +288,13 @@ never be called.</p>
 <div class="tsd-comment tsd-typography"><p>Function that will be executed.</p>
 </div></li>
 <li>
-<h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
+<h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type ">Worker</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">MessagePort</span><span class="tsd-signature-symbol">&gt;</span></h5>
 <div class="tsd-comment tsd-typography"><p>Input data for the given function.</p>
 </div></li></ul></div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#runAsync">runAsync</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/abstract-worker.ts#L208">src/worker/abstract-worker.ts:208</a></li></ul></aside></li></ul></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L231">src/worker/abstract-worker.ts:231</a></li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="runInAsyncScope" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>run<wbr/>In<wbr/>Async<wbr/>Scope</span><a href="#runInAsyncScope" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-inherited tsd-is-external">
@@ -364,7 +345,29 @@ then restore the original execution context.</p>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">Result</span></h4><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#runInAsyncScope">runInAsyncScope</a></p>
 <ul>
-<li>Defined in node_modules/.pnpm/@types+node@18.16.0/node_modules/@types/node/async_hooks.d.ts:303</li></ul></aside></li></ul></section>
+<li>Defined in node_modules/.pnpm/@types+node@20.1.0/node_modules/@types/node/async_hooks.d.ts:300</li></ul></aside></li></ul></section>
+<section class="tsd-panel tsd-member tsd-is-protected tsd-is-inherited"><a id="runSync" class="tsd-anchor"></a>
+<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagProtected">Protected</code> <span>run<wbr/>Sync</span><a href="#runSync" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
+<ul class="tsd-signatures tsd-is-protected tsd-is-inherited">
+<li class="tsd-signature tsd-anchor-link" id="runSync.runSync-1"><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">message</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 class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
+<li class="tsd-description">
+<div class="tsd-comment tsd-typography"><p>Runs the given function synchronously.</p>
+</div>
+<div class="tsd-parameters">
+<h4 class="tsd-parameters-title">Parameters</h4>
+<ul class="tsd-parameter-list">
+<li>
+<h5><span class="tsd-kind-parameter">fn</span>: <a href="../types/WorkerSyncFunction.html" class="tsd-signature-type tsd-kind-type-alias">WorkerSyncFunction</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h5>
+<div class="tsd-comment tsd-typography"><p>Function that will be executed.</p>
+</div></li>
+<li>
+<h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type ">Worker</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">MessagePort</span><span class="tsd-signature-symbol">&gt;</span></h5>
+<div class="tsd-comment tsd-typography"><p>Input data for the given function.</p>
+</div></li></ul></div>
+<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
+<p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#runSync">runSync</a></p>
+<ul>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/abstract-worker.ts#L204">src/worker/abstract-worker.ts:204</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 ts-flagProtected">Protected</code> <span>send<wbr/>To<wbr/>Main<wbr/>Worker</span><a href="#sendToMainWorker" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-protected">
@@ -376,13 +379,13 @@ then restore the original execution context.</p>
 <h4 class="tsd-parameters-title">Parameters</h4>
 <ul class="tsd-parameter-list">
 <li>
-<h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
+<h5><span class="tsd-kind-parameter">message</span>: <a href="../interfaces/MessageValue.html" class="tsd-signature-type tsd-kind-interface">MessageValue</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type ">Worker</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type ">MessagePort</span><span class="tsd-signature-symbol">&gt;</span></h5>
 <div class="tsd-comment tsd-typography"><p>The response message.</p>
 </div></li></ul></div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources">
 <p>Overrides <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#sendToMainWorker">sendToMainWorker</a></p>
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/0a1679b/src/worker/thread-worker.ts#L39">src/worker/thread-worker.ts:39</a></li></ul></aside></li></ul></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/c20870b/src/worker/thread-worker.ts#L51">src/worker/thread-worker.ts:51</a></li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="triggerAsyncId" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>trigger<wbr/>Async<wbr/>Id</span><a href="#triggerAsyncId" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-inherited tsd-is-external">
@@ -393,15 +396,13 @@ then restore the original execution context.</p>
 <aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#triggerAsyncId">triggerAsyncId</a></p>
 <ul>
-<li>Defined in node_modules/.pnpm/@types+node@18.16.0/node_modules/@types/node/async_hooks.d.ts:320</li></ul></aside></li></ul></section>
+<li>Defined in node_modules/.pnpm/@types+node@20.1.0/node_modules/@types/node/async_hooks.d.ts:317</li></ul></aside></li></ul></section>
 <section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="bind-2" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>bind</span><a href="#bind-2" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
 <ul class="tsd-signatures tsd-is-inherited tsd-is-external">
-<li class="tsd-signature tsd-anchor-link" id="bind-2.bind-3"><span class="tsd-kind-call-signature">bind</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">ThisArg</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">asyncResource</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">AsyncResource</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><a href="#bind-2.bind-3" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
+<li class="tsd-signature tsd-anchor-link" id="bind-2.bind-3"><span class="tsd-kind-call-signature">bind</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type tsd-kind-type-parameter">ThisArg</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">fn</span>, <span class="tsd-kind-parameter">type</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">thisArg</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type tsd-kind-type-parameter">Func</span><a href="#bind-2.bind-3" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></li>
 <li class="tsd-description">
 <div class="tsd-comment tsd-typography"><p>Binds the given function to the current execution context.</p>
-<p>The returned function will have an <code>asyncResource</code> property referencing
-the <code>AsyncResource</code> to which the function is bound.</p>
 
 <h3>Since</h3><p>v14.8.0, v12.19.0</p>
 </div>
@@ -425,10 +426,10 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 </div></li>
 <li>
 <h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">thisArg</span>: <span class="tsd-signature-type tsd-kind-type-parameter">ThisArg</span></h5></li></ul></div>
-<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">Func</span><span class="tsd-signature-symbol"> &amp; </span><span class="tsd-signature-symbol">{ </span><br/><span>    </span><span class="tsd-kind-property">asyncResource</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type ">AsyncResource</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h4><aside class="tsd-sources">
+<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type tsd-kind-type-parameter">Func</span></h4><aside class="tsd-sources">
 <p>Inherited from <a href="AbstractWorker.html">AbstractWorker</a>.<a href="AbstractWorker.html#bind-2">bind</a></p>
 <ul>
-<li>Defined in node_modules/.pnpm/@types+node@18.16.0/node_modules/@types/node/async_hooks.d.ts:273</li></ul></aside></li></ul></section></section></div>
+<li>Defined in node_modules/.pnpm/@types+node@20.1.0/node_modules/@types/node/async_hooks.d.ts:277</li></ul></aside></li></ul></section></section></div>
 <div class="col-sidebar">
 <div class="page-menu">
 <div class="tsd-navigation settings">
@@ -454,6 +455,7 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 <li><a href="#lastTaskTimestamp" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>last<wbr/>Task<wbr/>Timestamp</span></a></li>
 <li><a href="#mainWorker" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>main<wbr/>Worker</span></a></li>
 <li><a href="#opts" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>opts</span></a></li>
+<li><a href="#taskFunctions" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-1024-path"></use><use href="#icon-1024-text"></use></svg><span>task<wbr/>Functions</span></a></li>
 <li><a href="#asyncId" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>async<wbr/>Id</span></a></li>
 <li><a href="#bind" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>bind</span></a></li>
 <li><a href="#checkAlive" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>check<wbr/>Alive</span></a></li>
@@ -461,9 +463,9 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 <li><a href="#getMainWorker" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>get<wbr/>Main<wbr/>Worker</span></a></li>
 <li><a href="#handleError" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>handle<wbr/>Error</span></a></li>
 <li><a href="#messageListener" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>message<wbr/>Listener</span></a></li>
-<li><a href="#run" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run</span></a></li>
 <li><a href="#runAsync" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run<wbr/>Async</span></a></li>
 <li><a href="#runInAsyncScope" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run<wbr/>In<wbr/>Async<wbr/>Scope</span></a></li>
+<li><a href="#runSync" class="tsd-is-protected tsd-is-inherited"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>run<wbr/>Sync</span></a></li>
 <li><a href="#sendToMainWorker" class="tsd-is-protected"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>send<wbr/>To<wbr/>Main<wbr/>Worker</span></a></li>
 <li><a href="#triggerAsyncId" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>trigger<wbr/>Async<wbr/>Id</span></a></li>
 <li><a href="#bind-2" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-2048-path"></use><use href="#icon-2048-text"></use></svg><span>bind</span></a></li></ul></div></details></div>
@@ -480,6 +482,7 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 <li><a href="FixedClusterPool.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Fixed<wbr/>Cluster<wbr/>Pool</span></a></li>
 <li><a href="FixedThreadPool.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Fixed<wbr/>Thread<wbr/>Pool</span></a></li>
 <li><a href="PoolEmitter.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Pool<wbr/>Emitter</span></a></li>
+<li><a href="Queue.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Queue</span></a></li>
 <li><a href="ThreadWorker.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Thread<wbr/>Worker</span></a></li>
 <li><a href="WorkerChoiceStrategyContext.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</span></a></li>
 <li><a href="../interfaces/ClusterPoolOptions.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Cluster<wbr/>Pool<wbr/>Options</span></a></li>
@@ -503,6 +506,7 @@ the <code>AsyncResource</code> to which the function is bound.</p>
 <li><a href="../types/MessageHandler.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Message<wbr/>Handler</span></a></li>
 <li><a href="../types/OnlineHandler.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Online<wbr/>Handler</span></a></li>
 <li><a href="../types/PoolEvent.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Pool<wbr/>Event</span></a></li>
+<li><a href="../types/TaskFunctions.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Task<wbr/>Functions</span></a></li>
 <li><a href="../types/ThreadWorkerWithMessageChannel.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Thread<wbr/>Worker<wbr/>With<wbr/>Message<wbr/>Channel</span></a></li>
 <li><a href="../types/WorkerAsyncFunction.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Worker<wbr/>Async<wbr/>Function</span></a></li>
 <li><a href="../types/WorkerChoiceStrategy.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategy</span></a></li>