chore: generate documentation
[poolifier.git] / docs / interfaces / IPool.html
index fa5693f5038395cc509a11608b576aba5a23e309..e47007644f326d0f597368c00ba04242c6cce985 100644 (file)
@@ -42,7 +42,7 @@
 <ul class="tsd-hierarchy">
 <li><a href="../classes/AbstractPool.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractPool</a></li></ul></section><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L119">src/pools/pool.ts:119</a></li></ul></aside>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L119">src/pools/pool.ts:119</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">
 <h3 class="tsd-index-heading">Properties</h3>
 <div class="tsd-index-list"><a href="IPool.html#destroy" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="#FF984D" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12" id="icon-1024-path"></rect><path d="M9.354 16V7.24H12.174C12.99 7.24 13.638 7.476 14.118 7.948C14.606 8.412 14.85 9.036 14.85 9.82C14.85 10.604 14.606 11.232 14.118 11.704C13.638 12.168 12.99 12.4 12.174 12.4H10.434V16H9.354ZM10.434 11.428H12.174C12.646 11.428 13.022 11.284 13.302 10.996C13.59 10.7 13.734 10.308 13.734 9.82C13.734 9.324 13.59 8.932 13.302 8.644C13.022 8.356 12.646 8.212 12.174 8.212H10.434V11.428Z" fill="var(--color-text)" id="icon-1024-text"></path></svg><span>destroy</span></a>
 <a href="IPool.html#emitter" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>emitter?</span></a>
+<a href="IPool.html#enableTasksQueue" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>enable<wbr/>Tasks<wbr/>Queue</span></a>
 <a href="IPool.html#execute" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>execute</span></a>
 <a href="IPool.html#findFreeWorkerNodeKey" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key</span></a>
+<a href="IPool.html#setTasksQueueOptions" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span></a>
 <a href="IPool.html#setWorkerChoiceStrategy" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a>
+<a href="IPool.html#setWorkerChoiceStrategyOptions" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a>
 <a href="IPool.html#type" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>type</span></a>
 <a href="IPool.html#workerNodes" class="tsd-index-link tsd-kind-property tsd-parent-kind-interface"><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>worker<wbr/>Nodes</span></a>
 </div></section></div></details></section></section>
@@ -74,7 +77,7 @@
 </div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L163">src/pools/pool.ts:163</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L163">src/pools/pool.ts:163</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="emitter" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>emitter</span><a href="#emitter" 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">emitter<span class="tsd-signature-symbol">?:</span> <a href="../classes/PoolEmitter.html" class="tsd-signature-type" data-tsd-kind="Class">PoolEmitter</a></div>
 </ul>
 </div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L142">src/pools/pool.ts:142</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L142">src/pools/pool.ts:142</a></li></ul></aside></section>
+<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="enableTasksQueue" class="tsd-anchor"></a>
+<h3 class="tsd-anchor-link"><span>enable<wbr/>Tasks<wbr/>Queue</span><a href="#enableTasksQueue" aria-label="Permalink" class="tsd-anchor-icon"><svg 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">enable<wbr/>Tasks<wbr/>Queue<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>enable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, tasksQueueOptions<span class="tsd-signature-symbol">?: </span><a href="TasksQueueOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksQueueOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div>
+<div class="tsd-type-declaration">
+<h4>Type declaration</h4>
+<ul class="tsd-parameters">
+<li class="tsd-parameter-signature">
+<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
+<li class="tsd-signature" id="enableTasksQueue.__type-2.__type-3"><span class="tsd-signature-symbol">(</span>enable<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span>, tasksQueueOptions<span class="tsd-signature-symbol">?: </span><a href="TasksQueueOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksQueueOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
+<li class="tsd-description">
+<div class="tsd-comment tsd-typography"><p>Enables/disables the worker tasks queue in this pool.</p>
+</div>
+<div class="tsd-parameters">
+<h4 class="tsd-parameters-title">Parameters</h4>
+<ul class="tsd-parameter-list">
+<li>
+<h5>enable: <span class="tsd-signature-type">boolean</span></h5>
+<div class="tsd-comment tsd-typography"><p>Whether to enable or disable the worker tasks queue.</p>
+</div></li>
+<li>
+<h5><code class="tsd-tag ts-flagOptional">Optional</code> tasksQueueOptions: <a href="TasksQueueOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksQueueOptions</a></h5>
+<div class="tsd-comment tsd-typography"><p>The worker tasks queue options.</p>
+</div></li></ul></div>
+<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
+<ul>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L188">src/pools/pool.ts:188</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="execute" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>execute</span><a href="#execute" aria-label="Permalink" class="tsd-anchor-icon"><svg 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">execute<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></div>
+<div class="tsd-signature">execute<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span></div>
 <div class="tsd-type-declaration">
 <h4>Type declaration</h4>
 <ul class="tsd-parameters">
 <li class="tsd-parameter-signature">
 <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
-<li class="tsd-signature" id="execute.__type-2.__type-3"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></li>
+<li class="tsd-signature" id="execute.__type-4.__type-5"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></li>
 <li class="tsd-description">
-<div class="tsd-comment tsd-typography"><p>Performs the task specified in the constructor with the data parameter.</p>
+<div class="tsd-comment tsd-typography"><p>Executes the function specified in the worker constructor with the task data input parameter.</p>
 
-<h3>Returns</h3><p>Promise that will be resolved when the task is successfully completed.</p>
+<h3>Returns</h3><p>Promise that will be fulfilled when the task is completed.</p>
 </div>
 <div class="tsd-parameters">
 <h4 class="tsd-parameters-title">Parameters</h4>
 <ul class="tsd-parameter-list">
 <li>
-<h5>data: <span class="tsd-signature-type">Data</span></h5>
-<div class="tsd-comment tsd-typography"><p>The input for the specified task. This can only be serializable data.</p>
+<h5><code class="tsd-tag ts-flagOptional">Optional</code> data: <span class="tsd-signature-type">Data</span></h5>
+<div class="tsd-comment tsd-typography"><p>The task input data for the specified worker function. This can only be serializable data.</p>
 </div></li></ul></div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L159">src/pools/pool.ts:159</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L159">src/pools/pool.ts:159</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="findFreeWorkerNodeKey" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key</span><a href="#findFreeWorkerNodeKey" 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">find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span></div>
 <ul class="tsd-parameters">
 <li class="tsd-parameter-signature">
 <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
-<li class="tsd-signature" id="findFreeWorkerNodeKey.__type-4.__type-5"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
+<li class="tsd-signature" id="findFreeWorkerNodeKey.__type-6.__type-7"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li>
 <li class="tsd-description">
 <div class="tsd-comment tsd-typography"><p>Finds a free worker node key based on the number of tasks the worker has applied.</p>
 <p>If a worker is found with <code>0</code> running tasks, it is detected as free and its worker node key is returned.</p>
 </div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L152">src/pools/pool.ts:152</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L152">src/pools/pool.ts:152</a></li></ul></aside></section>
+<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="setTasksQueueOptions" class="tsd-anchor"></a>
+<h3 class="tsd-anchor-link"><span>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span><a href="#setTasksQueueOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg 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">set<wbr/>Tasks<wbr/>Queue<wbr/>Options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>tasksQueueOptions<span class="tsd-signature-symbol">: </span><a href="TasksQueueOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksQueueOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div>
+<div class="tsd-type-declaration">
+<h4>Type declaration</h4>
+<ul class="tsd-parameters">
+<li class="tsd-parameter-signature">
+<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
+<li class="tsd-signature" id="setTasksQueueOptions.__type-8.__type-9"><span class="tsd-signature-symbol">(</span>tasksQueueOptions<span class="tsd-signature-symbol">: </span><a href="TasksQueueOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksQueueOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
+<li class="tsd-description">
+<div class="tsd-comment tsd-typography"><p>Sets the worker tasks queue options in this pool.</p>
+</div>
+<div class="tsd-parameters">
+<h4 class="tsd-parameters-title">Parameters</h4>
+<ul class="tsd-parameter-list">
+<li>
+<h5>tasksQueueOptions: <a href="TasksQueueOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">TasksQueueOptions</a></h5>
+<div class="tsd-comment tsd-typography"><p>The worker tasks queue options.</p>
+</div></li></ul></div>
+<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
+<ul>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L197">src/pools/pool.ts:197</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="setWorkerChoiceStrategy" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span><a href="#setWorkerChoiceStrategy" aria-label="Permalink" class="tsd-anchor-icon"><svg 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">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>workerChoiceStrategy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div>
+<div class="tsd-signature">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>workerChoiceStrategy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span>, workerChoiceStrategyOptions<span class="tsd-signature-symbol">?: </span><a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerChoiceStrategyOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div>
 <div class="tsd-type-declaration">
 <h4>Type declaration</h4>
 <ul class="tsd-parameters">
 <li class="tsd-parameter-signature">
 <ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
-<li class="tsd-signature" id="setWorkerChoiceStrategy.__type-6.__type-7"><span class="tsd-signature-symbol">(</span>workerChoiceStrategy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
+<li class="tsd-signature" id="setWorkerChoiceStrategy.__type-10.__type-11"><span class="tsd-signature-symbol">(</span>workerChoiceStrategy<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span>, workerChoiceStrategyOptions<span class="tsd-signature-symbol">?: </span><a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerChoiceStrategyOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
 <li class="tsd-description">
 <div class="tsd-comment tsd-typography"><p>Sets the worker choice strategy in this pool.</p>
 </div>
 <li>
 <h5>workerChoiceStrategy: <span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_USED&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;LESS_BUSY&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span></h5>
 <div class="tsd-comment tsd-typography"><p>The worker choice strategy.</p>
+</div></li>
+<li>
+<h5><code class="tsd-tag ts-flagOptional">Optional</code> workerChoiceStrategyOptions: <a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerChoiceStrategyOptions</a></h5>
+<div class="tsd-comment tsd-typography"><p>The worker choice strategy options.</p>
+</div></li></ul></div>
+<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
+<ul>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L170">src/pools/pool.ts:170</a></li></ul></aside></section>
+<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="setWorkerChoiceStrategyOptions" class="tsd-anchor"></a>
+<h3 class="tsd-anchor-link"><span>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span><a href="#setWorkerChoiceStrategyOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg 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">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>workerChoiceStrategyOptions<span class="tsd-signature-symbol">: </span><a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerChoiceStrategyOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div>
+<div class="tsd-type-declaration">
+<h4>Type declaration</h4>
+<ul class="tsd-parameters">
+<li class="tsd-parameter-signature">
+<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
+<li class="tsd-signature" id="setWorkerChoiceStrategyOptions.__type-12.__type-13"><span class="tsd-signature-symbol">(</span>workerChoiceStrategyOptions<span class="tsd-signature-symbol">: </span><a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerChoiceStrategyOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
+<li class="tsd-description">
+<div class="tsd-comment tsd-typography"><p>Sets the worker choice strategy options in this pool.</p>
+</div>
+<div class="tsd-parameters">
+<h4 class="tsd-parameters-title">Parameters</h4>
+<ul class="tsd-parameter-list">
+<li>
+<h5>workerChoiceStrategyOptions: <a href="WorkerChoiceStrategyOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerChoiceStrategyOptions</a></h5>
+<div class="tsd-comment tsd-typography"><p>The worker choice strategy options.</p>
 </div></li></ul></div>
 <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L169">src/pools/pool.ts:169</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L179">src/pools/pool.ts:179</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="type" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>type</span><a href="#type" 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">type<span class="tsd-signature-symbol">:</span> <a href="../enums/PoolType.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PoolType</a></div>
 <p>If it is <code>&#39;dynamic&#39;</code>, it provides the <code>max</code> property.</p>
 </div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L129">src/pools/pool.ts:129</a></li></ul></aside></section>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L129">src/pools/pool.ts:129</a></li></ul></aside></section>
 <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="workerNodes" class="tsd-anchor"></a>
 <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagReadonly">Readonly</code> <span>worker<wbr/>Nodes</span><a href="#workerNodes" 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">worker<wbr/>Nodes<span class="tsd-signature-symbol">:</span> <a href="WorkerNode.html" class="tsd-signature-type" data-tsd-kind="Interface">WorkerNode</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Worker</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">[]</span></div>
 <div class="tsd-comment tsd-typography"><p>Pool worker nodes.</p>
 </div><aside class="tsd-sources">
 <ul>
-<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/e39450c/src/pools/pool.ts#L133">src/pools/pool.ts:133</a></li></ul></aside></section></section></div>
+<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/ef41a6e/src/pools/pool.ts#L133">src/pools/pool.ts:133</a></li></ul></aside></section></section></div>
 <div class="col-sidebar">
 <div class="page-menu">
 <div class="tsd-navigation settings">
 <ul>
 <li><a href="#destroy" class="tsd-kind-property tsd-parent-kind-interface"><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>destroy</span></a></li>
 <li><a href="#emitter" class="tsd-kind-property tsd-parent-kind-interface"><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>emitter</span></a></li>
+<li><a href="#enableTasksQueue" class="tsd-kind-property tsd-parent-kind-interface"><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>enable<wbr/>Tasks<wbr/>Queue</span></a></li>
 <li><a href="#execute" class="tsd-kind-property tsd-parent-kind-interface"><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>execute</span></a></li>
 <li><a href="#findFreeWorkerNodeKey" class="tsd-kind-property tsd-parent-kind-interface"><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>find<wbr/>Free<wbr/>Worker<wbr/>Node<wbr/>Key</span></a></li>
+<li><a href="#setTasksQueueOptions" class="tsd-kind-property tsd-parent-kind-interface"><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>set<wbr/>Tasks<wbr/>Queue<wbr/>Options</span></a></li>
 <li><a href="#setWorkerChoiceStrategy" class="tsd-kind-property tsd-parent-kind-interface"><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>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</span></a></li>
+<li><a href="#setWorkerChoiceStrategyOptions" class="tsd-kind-property tsd-parent-kind-interface"><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>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<wbr/>Options</span></a></li>
 <li><a href="#type" class="tsd-kind-property tsd-parent-kind-interface"><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>type</span></a></li>
 <li><a href="#workerNodes" class="tsd-kind-property tsd-parent-kind-interface"><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>worker<wbr/>Nodes</span></a></li></ul></div></details></div>
 <div class="site-menu">
 <li><a href="../types/OnlineHandler.html" class="tsd-kind-type-alias"><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" class="tsd-kind-type-alias"><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/ThreadWorkerWithMessageChannel.html" class="tsd-kind-type-alias"><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" class="tsd-kind-type-alias"><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" class="tsd-kind-type-alias"><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>
+<li><a href="../types/WorkerFunction.html" class="tsd-kind-type-alias"><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/>Function</span></a></li>
+<li><a href="../types/WorkerSyncFunction.html" class="tsd-kind-type-alias"><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/>Sync<wbr/>Function</span></a></li>
 <li><a href="../variables/KillBehaviors.html" class="tsd-kind-variable"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg><span>Kill<wbr/>Behaviors</span></a></li>
 <li><a href="../variables/PoolEvents.html" class="tsd-kind-variable"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg><span>Pool<wbr/>Events</span></a></li>
 <li><a href="../variables/WorkerChoiceStrategies.html" class="tsd-kind-variable"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg><span>Worker<wbr/>Choice<wbr/>Strategies</span></a></li></ul></nav></div></div></div>