Update documentation
[poolifier.git] / docs / classes / fixedthreadpool.html
index 90a4ae16471421917a5dd7f039111aa089d968fb..b7019f27a2dc4b867f232824643f81e272c37c72 100644 (file)
-<!doctype html>
-<html class="default no-js">
-<head>
-       <meta charset="utf-8">
-       <meta http-equiv="X-UA-Compatible" content="IE=edge">
-       <title>FixedThreadPool | poolifier</title>
-       <meta name="description" content="Documentation for poolifier">
-       <meta name="viewport" content="width=device-width, initial-scale=1">
-       <link rel="stylesheet" href="../assets/css/main.css">
-       <script async src="../assets/js/search.js" id="search-script"></script>
-</head>
-<body>
-<header>
-       <div class="tsd-page-toolbar">
-               <div class="container">
-                       <div class="table-wrap">
-                               <div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
-                                       <div class="field">
-                                               <label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
-                                               <input id="tsd-search-field" type="text" />
-                                       </div>
-                                       <ul class="results">
-                                               <li class="state loading">Preparing search index...</li>
-                                               <li class="state failure">The search index is not available</li>
-                                       </ul>
-                                       <a href="../index.html" class="title">poolifier</a>
-                               </div>
-                               <div class="table-cell" id="tsd-widgets">
-                                       <div id="tsd-filter">
-                                               <a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
-                                               <div class="tsd-filter-group">
-                                                       <div class="tsd-select" id="tsd-filter-visibility">
-                                                               <span class="tsd-select-label">All</span>
-                                                               <ul class="tsd-select-list">
-                                                                       <li data-value="public">Public</li>
-                                                                       <li data-value="protected">Public/Protected</li>
-                                                                       <li data-value="private" class="selected">All</li>
-                                                               </ul>
-                                                       </div>
-                                                       <input type="checkbox" id="tsd-filter-inherited" checked />
-                                                       <label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
-                                                       <input type="checkbox" id="tsd-filter-externals" checked />
-                                                       <label class="tsd-widget" for="tsd-filter-externals">Externals</label>
-                                               </div>
-                                       </div>
-                                       <a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
-                               </div>
-                       </div>
-               </div>
-       </div>
-       <div class="tsd-page-title">
-               <div class="container">
-                       <ul class="tsd-breadcrumb">
-                               <li>
-                                       <a href="../index.html">poolifier</a>
-                               </li>
-                               <li>
-                                       <a href="fixedthreadpool.html">FixedThreadPool</a>
-                               </li>
-                       </ul>
-                       <h1>Class FixedThreadPool&lt;Data, Response&gt;</h1>
-               </div>
-       </div>
-</header>
-<div class="container container-main">
-       <div class="row">
-               <div class="col-8 col-content">
-                       <section class="tsd-panel tsd-comment">
-                               <div class="tsd-comment tsd-typography">
-                                       <div class="lead">
-                                               <p>A thread pool with a fixed number of threads.</p>
-                                       </div>
-                                       <p>It is possible to perform tasks in sync or asynchronous mode as you prefer.</p>
-                                       <p>This pool selects the threads in a round robin fashion.</p>
-                                       <dl class="tsd-comment-tags">
-                                               <dt>author</dt>
-                                               <dd><p><a href="https://github.com/pioardi">Alessandro Pio Ardizio</a></p>
-                                               </dd>
-                                               <dt>since</dt>
-                                               <dd><p>0.0.1</p>
-                                               </dd>
-                                       </dl>
-                               </div>
-                       </section>
-                       <section class="tsd-panel tsd-type-parameters">
-                               <h3>Type parameters</h3>
-                               <ul class="tsd-type-parameters">
-                                       <li>
-                                               <h4>Data = <span class="tsd-signature-type">unknown</span></h4>
-                                               <div class="tsd-comment tsd-typography">
-                                                       <div class="lead">
-                                                               <p>Type of data sent to the worker. This can only be serializable data.</p>
-                                                       </div>
-                                               </div>
-                                       </li>
-                                       <li>
-                                               <h4>Response = <span class="tsd-signature-type">unknown</span></h4>
-                                               <div class="tsd-comment tsd-typography">
-                                                       <div class="lead">
-                                                               <p>Type of response of execution. This can only be serializable data.</p>
-                                                       </div>
-                                               </div>
-                                       </li>
-                               </ul>
-                       </section>
-                       <section class="tsd-panel tsd-hierarchy">
-                               <h3>Hierarchy</h3>
-                               <ul class="tsd-hierarchy">
-                                       <li>
-                                               <span class="tsd-signature-type">AbstractPool</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span>
-                                               <ul class="tsd-hierarchy">
-                                                       <li>
-                                                               <span class="target">FixedThreadPool</span>
-                                                               <ul class="tsd-hierarchy">
-                                                                       <li>
-                                                                               <a href="dynamicthreadpool.html" class="tsd-signature-type" data-tsd-kind="Class">DynamicThreadPool</a>
-                                                                       </li>
-                                                               </ul>
-                                                       </li>
-                                               </ul>
-                                       </li>
-                               </ul>
-                       </section>
-                       <section class="tsd-panel-group tsd-index-group">
-                               <h2>Index</h2>
-                               <section class="tsd-panel tsd-index-panel">
-                                       <div class="tsd-index-content">
-                                               <section class="tsd-index-section ">
-                                                       <h3>Constructors</h3>
-                                                       <ul class="tsd-index-list">
-                                                               <li class="tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter"><a href="fixedthreadpool.html#constructor" class="tsd-kind-icon">constructor</a></li>
-                                                       </ul>
-                                               </section>
-                                               <section class="tsd-index-section ">
-                                                       <h3>Properties</h3>
-                                                       <ul class="tsd-index-list">
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#emitter" class="tsd-kind-icon">emitter</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#filepath" class="tsd-kind-icon">file<wbr>Path</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#max" class="tsd-kind-icon">max</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#nextmessageid" class="tsd-kind-icon">next<wbr>Message<wbr>Id</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#numberofworkers" class="tsd-kind-icon">number<wbr>OfWorkers</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#opts" class="tsd-kind-icon">opts</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#promisemap" class="tsd-kind-icon">promise<wbr>Map</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#tasks" class="tsd-kind-icon">tasks</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#workerchoicestrategycontext" class="tsd-kind-icon">worker<wbr>Choice<wbr>Strategy<wbr>Context</a></li>
-                                                               <li class="tsd-kind-property tsd-parent-kind-class"><a href="fixedthreadpool.html#workers" class="tsd-kind-icon">workers</a></li>
-                                                       </ul>
-                                               </section>
-                                               <section class="tsd-index-section ">
-                                                       <h3>Accessors</h3>
-                                                       <ul class="tsd-index-list">
-                                                               <li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="fixedthreadpool.html#busy" class="tsd-kind-icon">busy</a></li>
-                                                               <li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="fixedthreadpool.html#numberofrunningtasks" class="tsd-kind-icon">number<wbr>OfRunning<wbr>Tasks</a></li>
-                                                               <li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="fixedthreadpool.html#type" class="tsd-kind-icon">type</a></li>
-                                                       </ul>
-                                               </section>
-                                               <section class="tsd-index-section ">
-                                                       <h3>Methods</h3>
-                                                       <ul class="tsd-index-list">
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#afterworkersetup" class="tsd-kind-icon">after<wbr>Worker<wbr>Setup</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#chooseworker" class="tsd-kind-icon">choose<wbr>Worker</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#createandsetupworker" class="tsd-kind-icon">create<wbr>And<wbr>Setup<wbr>Worker</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#createworker" class="tsd-kind-icon">create<wbr>Worker</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#decreaseworkerstasks" class="tsd-kind-icon">decrease<wbr>Workers<wbr>Tasks</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedthreadpool.html#destroy" class="tsd-kind-icon">destroy</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedthreadpool.html#destroyworker" class="tsd-kind-icon">destroy<wbr>Worker</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedthreadpool.html#execute" class="tsd-kind-icon">execute</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedthreadpool.html#findfreetasksmapentry" class="tsd-kind-icon">find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#increaseworkerstask" class="tsd-kind-icon">increase<wbr>Workers<wbr>Task</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#internalexecute" class="tsd-kind-icon">internal<wbr>Execute</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#internalgetbusystatus" class="tsd-kind-icon">internal<wbr>Get<wbr>Busy<wbr>Status</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#ismain" class="tsd-kind-icon">is<wbr>Main</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="fixedthreadpool.html#registerworkermessagelistener" class="tsd-kind-icon">register<wbr>Worker<wbr>Message<wbr>Listener</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#removeworker" class="tsd-kind-icon">remove<wbr>Worker</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#sendtoworker" class="tsd-kind-icon">send<wbr>ToWorker</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class"><a href="fixedthreadpool.html#setworkerchoicestrategy" class="tsd-kind-icon">set<wbr>Worker<wbr>Choice<wbr>Strategy</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#setuphook" class="tsd-kind-icon">setup<wbr>Hook</a></li>
-                                                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><a href="fixedthreadpool.html#workerlistener" class="tsd-kind-icon">worker<wbr>Listener</a></li>
-                                                       </ul>
-                                               </section>
-                                       </div>
-                               </section>
-                       </section>
-                       <section class="tsd-panel-group tsd-member-group ">
-                               <h2>Constructors</h2>
-                               <section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter">
-                                       <a name="constructor" class="tsd-anchor"></a>
-                                       <h3>constructor</h3>
-                                       <ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter">
-                                               <li class="tsd-signature tsd-kind-icon">new <wbr>Fixed<wbr>Thread<wbr>Pool&lt;Data, Response&gt;<span class="tsd-signature-symbol">(</span>numberOfThreads<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, filePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, opts<span class="tsd-signature-symbol">?: </span><a href="../interfaces/pooloptions.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="fixedthreadpool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedThreadPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L28">src/pools/thread/fixed.ts:28</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Constructs a new poolifier fixed thread pool.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-type-parameters-title">Type parameters</h4>
-                                                       <ul class="tsd-type-parameters">
-                                                               <li>
-                                                                       <h4>Data = <span class="tsd-signature-type">unknown</span></h4>
-                                                               </li>
-                                                               <li>
-                                                                       <h4>Response = <span class="tsd-signature-type">unknown</span></h4>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>numberOfThreads: <span class="tsd-signature-type">number</span></h5>
-                                                                       <div class="tsd-comment tsd-typography">
-                                                                               <p>Number of threads for this pool.</p>
-                                                                       </div>
-                                                               </li>
-                                                               <li>
-                                                                       <h5>filePath: <span class="tsd-signature-type">string</span></h5>
-                                                                       <div class="tsd-comment tsd-typography">
-                                                                               <p>Path to an implementation of a <code>ThreadWorker</code> file, which can be relative or absolute.</p>
-                                                                       </div>
-                                                               </li>
-                                                               <li>
-                                                                       <h5>opts: <a href="../interfaces/pooloptions.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></h5>
-                                                                       <div class="tsd-comment tsd-typography">
-                                                                               <p>Options for this fixed thread pool. Default: <code>{}</code></p>
-                                                                       </div>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <a href="fixedthreadpool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedThreadPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                       </section>
-                       <section class="tsd-panel-group tsd-member-group ">
-                               <h2>Properties</h2>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="emitter" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> emitter</h3>
-                                       <div class="tsd-signature tsd-kind-icon">emitter<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">PoolEmitter</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L117">src/pools/abstract-pool.ts:117</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <dl class="tsd-comment-tags">
-                                                       <dt>inheritdoc</dt>
-                                                       <dd></dd>
-                                               </dl>
-                                       </div>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="filepath" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> file<wbr>Path</h3>
-                                       <div class="tsd-signature tsd-kind-icon">file<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
-                                       <aside class="tsd-sources">
-                                       </aside>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="max" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> max</h3>
-                                       <div class="tsd-signature tsd-kind-icon">max<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L120">src/pools/abstract-pool.ts:120</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <dl class="tsd-comment-tags">
-                                                       <dt>inheritdoc</dt>
-                                                       <dd></dd>
-                                               </dl>
-                                       </div>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected">
-                                       <a name="nextmessageid" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> next<wbr>Message<wbr>Id</h3>
-                                       <div class="tsd-signature tsd-kind-icon">next<wbr>Message<wbr>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L138">src/pools/abstract-pool.ts:138</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <div class="lead">
-                                                       <p>ID of the next message.</p>
-                                               </div>
-                                       </div>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="numberofworkers" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> number<wbr>OfWorkers</h3>
-                                       <div class="tsd-signature tsd-kind-icon">number<wbr>OfWorkers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
-                                       <aside class="tsd-sources">
-                                       </aside>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="opts" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> opts</h3>
-                                       <div class="tsd-signature tsd-kind-icon">opts<span class="tsd-signature-symbol">:</span> <a href="../interfaces/pooloptions.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">&gt;</span></div>
-                                       <aside class="tsd-sources">
-                                       </aside>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected">
-                                       <a name="promisemap" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> promise<wbr>Map</h3>
-                                       <div class="tsd-signature tsd-kind-icon">promise<wbr>Map<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">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">PromiseWorkerResponseWrapper</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L130">src/pools/abstract-pool.ts:130</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <div class="lead">
-                                                       <p>The promise map.</p>
-                                               </div>
-                                               <ul>
-                                                       <li><code>key</code>: This is the message ID of each submitted task.</li>
-                                                       <li><code>value</code>: An object that contains the worker, the resolve function and the reject function.</li>
-                                               </ul>
-                                               <p>When we receive a message from the worker we get a map entry and resolve/reject the promise based on the message.</p>
-                                       </div>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="tasks" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> tasks</h3>
-                                       <div class="tsd-signature tsd-kind-icon">tasks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L114">src/pools/abstract-pool.ts:114</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <dl class="tsd-comment-tags">
-                                                       <dt>inheritdoc</dt>
-                                                       <dd></dd>
-                                               </dl>
-                                       </div>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-protected">
-                                       <a name="workerchoicestrategycontext" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> worker<wbr>Choice<wbr>Strategy<wbr>Context</h3>
-                                       <div class="tsd-signature tsd-kind-icon">worker<wbr>Choice<wbr>Strategy<wbr>Context<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WorkerChoiceStrategyContext</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">&gt;</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L145">src/pools/abstract-pool.ts:145</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <div class="lead">
-                                                       <p>Worker choice strategy instance implementing the worker choice algorithm.</p>
-                                               </div>
-                                               <p>Default to a strategy implementing a round robin algorithm.</p>
-                                       </div>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
-                                       <a name="workers" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagReadonly">Readonly</span> workers</h3>
-                                       <div class="tsd-signature tsd-kind-icon">workers<span class="tsd-signature-symbol">:</span> <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = ...</span></div>
-                                       <aside class="tsd-sources">
-                                               <ul>
-                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L111">src/pools/abstract-pool.ts:111</a></li>
-                                               </ul>
-                                       </aside>
-                                       <div class="tsd-comment tsd-typography">
-                                               <dl class="tsd-comment-tags">
-                                                       <dt>inheritdoc</dt>
-                                                       <dd></dd>
-                                               </dl>
-                                       </div>
-                               </section>
-                       </section>
-                       <section class="tsd-panel-group tsd-member-group ">
-                               <h2>Accessors</h2>
-                               <section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
-                                       <a name="busy" class="tsd-anchor"></a>
-                                       <h3>busy</h3>
-                                       <ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> busy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L92">src/pools/thread/fixed.ts:92</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
-                                       <a name="numberofrunningtasks" class="tsd-anchor"></a>
-                                       <h3>number<wbr>OfRunning<wbr>Tasks</h3>
-                                       <ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> numberOfRunningTasks<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>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L232">src/pools/abstract-pool.ts:232</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
-                                       <a name="type" class="tsd-anchor"></a>
-                                       <h3>type</h3>
-                                       <ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> type<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PoolType</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L87">src/pools/thread/fixed.ts:87</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PoolType</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                       </section>
-                       <section class="tsd-panel-group tsd-member-group ">
-                               <h2>Methods</h2>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="afterworkersetup" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> after<wbr>Worker<wbr>Setup</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">after<wbr>Worker<wbr>Setup<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L77">src/pools/thread/fixed.ts:77</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="chooseworker" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> choose<wbr>Worker</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">choose<wbr>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L356">src/pools/abstract-pool.ts:356</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Choose a worker for the next task.</p>
-                                                               </div>
-                                                               <p>The default implementation uses a round robin algorithm to distribute the load.</p>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h4>
-                                                       <p>Worker.</p>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="createandsetupworker" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> create<wbr>And<wbr>Setup<wbr>Worker</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">create<wbr>And<wbr>Setup<wbr>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L409">src/pools/abstract-pool.ts:409</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Creates a new worker for this pool and sets it up completely.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h4>
-                                                       <p>New, completely set up worker.</p>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="createworker" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> create<wbr>Worker</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">create<wbr>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L71">src/pools/thread/fixed.ts:71</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <h4 class="tsd-returns-title">Returns <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="decreaseworkerstasks" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> decrease<wbr>Workers<wbr>Tasks</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">decrease<wbr>Workers<wbr>Tasks<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L318">src/pools/abstract-pool.ts:318</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Decrease the number of tasks that the given workers has applied.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                                       <div class="tsd-comment tsd-typography">
-                                                                               <p>Worker whose tasks are decreased.</p>
-                                                                       </div>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
-                                       <a name="destroy" class="tsd-anchor"></a>
-                                       <h3>destroy</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon">destroy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L280">src/pools/abstract-pool.ts:280</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </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>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
-                                       <a name="destroyworker" class="tsd-anchor"></a>
-                                       <h3>destroy<wbr>Worker</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon">destroy<wbr>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L49">src/pools/thread/fixed.ts:49</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                               </li>
-                                                       </ul>
-                                                       <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>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
-                                       <a name="execute" class="tsd-anchor"></a>
-                                       <h3>execute</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon">execute<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>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L268">src/pools/abstract-pool.ts:268</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>data: <span class="tsd-signature-type">Data</span></h5>
-                                                               </li>
-                                                       </ul>
-                                                       <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>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
-                                       <a name="findfreetasksmapentry" class="tsd-anchor"></a>
-                                       <h3>find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon">find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L257">src/pools/abstract-pool.ts:257</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="increaseworkerstask" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> increase<wbr>Workers<wbr>Task</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">increase<wbr>Workers<wbr>Task<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L309">src/pools/abstract-pool.ts:309</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Increase the number of tasks that the given workers has applied.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                                       <div class="tsd-comment tsd-typography">
-                                                                               <p>Worker whose tasks are increased.</p>
-                                                                       </div>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="internalexecute" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> internal<wbr>Execute</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">internal<wbr>Execute<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a>, messageId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</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>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L381">src/pools/abstract-pool.ts:381</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                               </li>
-                                                               <li>
-                                                                       <h5>messageId: <span class="tsd-signature-type">number</span></h5>
-                                                               </li>
-                                                       </ul>
-                                                       <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>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="internalgetbusystatus" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> internal<wbr>Get<wbr>Busy<wbr>Status</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">internal<wbr>Get<wbr>Busy<wbr>Status<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L249">src/pools/abstract-pool.ts:249</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="ismain" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> is<wbr>Main</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">is<wbr>Main<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L44">src/pools/thread/fixed.ts:44</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter">
-                                       <a name="registerworkermessagelistener" class="tsd-anchor"></a>
-                                       <h3>register<wbr>Worker<wbr>Message<wbr>Listener</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter">
-                                               <li class="tsd-signature tsd-kind-icon">register<wbr>Worker<wbr>Message<wbr>Listener&lt;Message&gt;<span class="tsd-signature-symbol">(</span>messageChannel<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L64">src/pools/thread/fixed.ts:64</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-type-parameters-title">Type parameters</h4>
-                                                       <ul class="tsd-type-parameters">
-                                                               <li>
-                                                                       <h4>Message</h4>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>messageChannel: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                               </li>
-                                                               <li>
-                                                                       <h5>listener: <span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5>
-                                                                       <ul class="tsd-parameters">
-                                                                               <li class="tsd-parameter-signature">
-                                                                                       <ul class="tsd-signatures tsd-kind-type-literal">
-                                                                                               <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                                                                       </ul>
-                                                                                       <ul class="tsd-descriptions">
-                                                                                               <li class="tsd-description">
-                                                                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                                                                       <ul class="tsd-parameters">
-                                                                                                               <li>
-                                                                                                                       <h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
-                                                                                                               </li>
-                                                                                                       </ul>
-                                                                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                                                                               </li>
-                                                                                       </ul>
-                                                                               </li>
-                                                                       </ul>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="removeworker" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> remove<wbr>Worker</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">remove<wbr>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L342">src/pools/abstract-pool.ts:342</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Removes the given worker from the pool.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                                       <div class="tsd-comment tsd-typography">
-                                                                               <p>Worker that will be removed.</p>
-                                                                       </div>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="sendtoworker" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> send<wbr>ToWorker</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">send<wbr>ToWorker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/thread/fixed.ts#L56">src/pools/thread/fixed.ts:56</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <li>
-                                                                       <h5>worker: <a href="../index.html#threadworkerwithmessagechannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5>
-                                                               </li>
-                                                               <li>
-                                                                       <h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
-                                       <a name="setworkerchoicestrategy" class="tsd-anchor"></a>
-                                       <h3>set<wbr>Worker<wbr>Choice<wbr>Strategy</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
-                                               <li class="tsd-signature tsd-kind-icon">set<wbr>Worker<wbr>Choice<wbr>Strategy<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_RECENTLY_USED&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L237">src/pools/abstract-pool.ts:237</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <dl class="tsd-comment-tags">
-                                                                       <dt>inheritdoc</dt>
-                                                                       <dd></dd>
-                                                               </dl>
-                                                       </div>
-                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                       <ul class="tsd-parameters">
-                                                               <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_RECENTLY_USED&quot;</span></h5>
-                                                               </li>
-                                                       </ul>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="setuphook" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> setup<wbr>Hook</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">setup<wbr>Hook<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L295">src/pools/abstract-pool.ts:295</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>Setup hook that can be overridden by a Poolifier pool implementation
-                                                                       to run code before workers are created in the abstract constructor.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                               </li>
-                                       </ul>
-                               </section>
-                               <section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                       <a name="workerlistener" class="tsd-anchor"></a>
-                                       <h3><span class="tsd-flag ts-flagProtected">Protected</span> worker<wbr>Listener</h3>
-                                       <ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                               <li class="tsd-signature tsd-kind-icon">worker<wbr>Listener<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></li>
-                                       </ul>
-                                       <ul class="tsd-descriptions">
-                                               <li class="tsd-description">
-                                                       <aside class="tsd-sources">
-                                                               <ul>
-                                                                       <li>Defined in <a href="https://github.com/pioardi/poolifier/blob/36b71cf/src/pools/abstract-pool.ts#L432">src/pools/abstract-pool.ts:432</a></li>
-                                                               </ul>
-                                                       </aside>
-                                                       <div class="tsd-comment tsd-typography">
-                                                               <div class="lead">
-                                                                       <p>This function is the listener registered for each worker.</p>
-                                                               </div>
-                                                       </div>
-                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h4>
-                                                       <p>The listener function to execute when a message is sent from a worker.</p>
-                                                       <ul class="tsd-parameters">
-                                                               <li class="tsd-parameter-signature">
-                                                                       <ul class="tsd-signatures tsd-kind-type-literal">
-                                                                               <li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
-                                                                       </ul>
-                                                                       <ul class="tsd-descriptions">
-                                                                               <li class="tsd-description">
-                                                                                       <h4 class="tsd-parameters-title">Parameters</h4>
-                                                                                       <ul class="tsd-parameters">
-                                                                                               <li>
-                                                                                                       <h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">Response</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5>
-                                                                                               </li>
-                                                                                       </ul>
-                                                                                       <h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
-                                                                               </li>
-                                                                       </ul>
-                                                               </li>
-                                                       </ul>
-                                               </li>
-                                       </ul>
-                               </section>
-                       </section>
-               </div>
-               <div class="col-4 col-menu menu-sticky-wrap menu-highlight">
-                       <nav class="tsd-navigation primary">
-                               <ul>
-                                       <li class=" ">
-                                               <a href="../index.html">Exports</a>
-                                       </li>
-                               </ul>
-                       </nav>
-                       <nav class="tsd-navigation secondary menu-sticky">
-                               <ul class="before-current">
-                                       <li class=" tsd-kind-class tsd-has-type-parameter">
-                                               <a href="abstractworker.html" class="tsd-kind-icon">Abstract<wbr>Worker</a>
-                                       </li>
-                                       <li class=" tsd-kind-class tsd-has-type-parameter">
-                                               <a href="clusterworker.html" class="tsd-kind-icon">Cluster<wbr>Worker</a>
-                                       </li>
-                                       <li class=" tsd-kind-class tsd-has-type-parameter">
-                                               <a href="dynamicclusterpool.html" class="tsd-kind-icon">Dynamic<wbr>Cluster<wbr>Pool</a>
-                                       </li>
-                                       <li class=" tsd-kind-class tsd-has-type-parameter">
-                                               <a href="dynamicthreadpool.html" class="tsd-kind-icon">Dynamic<wbr>Thread<wbr>Pool</a>
-                                       </li>
-                                       <li class=" tsd-kind-class tsd-has-type-parameter">
-                                               <a href="fixedclusterpool.html" class="tsd-kind-icon">Fixed<wbr>Cluster<wbr>Pool</a>
-                                       </li>
-                               </ul>
-                               <ul class="current">
-                                       <li class="current tsd-kind-class tsd-has-type-parameter">
-                                               <a href="fixedthreadpool.html" class="tsd-kind-icon">Fixed<wbr>Thread<wbr>Pool</a>
-                                               <ul>
-                                                       <li class=" tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter">
-                                                               <a href="fixedthreadpool.html#constructor" class="tsd-kind-icon">constructor</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#emitter" class="tsd-kind-icon">emitter</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#filepath" class="tsd-kind-icon">file<wbr>Path</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#max" class="tsd-kind-icon">max</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#nextmessageid" class="tsd-kind-icon">next<wbr>Message<wbr>Id</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#numberofworkers" class="tsd-kind-icon">number<wbr>OfWorkers</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#opts" class="tsd-kind-icon">opts</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#promisemap" class="tsd-kind-icon">promise<wbr>Map</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#tasks" class="tsd-kind-icon">tasks</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#workerchoicestrategycontext" class="tsd-kind-icon">worker<wbr>Choice<wbr>Strategy<wbr>Context</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-property tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#workers" class="tsd-kind-icon">workers</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-get-signature tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#busy" class="tsd-kind-icon">busy</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-get-signature tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#numberofrunningtasks" class="tsd-kind-icon">number<wbr>OfRunning<wbr>Tasks</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-get-signature tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#type" class="tsd-kind-icon">type</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#afterworkersetup" class="tsd-kind-icon">after<wbr>Worker<wbr>Setup</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#chooseworker" class="tsd-kind-icon">choose<wbr>Worker</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#createandsetupworker" class="tsd-kind-icon">create<wbr>And<wbr>Setup<wbr>Worker</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#createworker" class="tsd-kind-icon">create<wbr>Worker</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#decreaseworkerstasks" class="tsd-kind-icon">decrease<wbr>Workers<wbr>Tasks</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#destroy" class="tsd-kind-icon">destroy</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#destroyworker" class="tsd-kind-icon">destroy<wbr>Worker</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#execute" class="tsd-kind-icon">execute</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#findfreetasksmapentry" class="tsd-kind-icon">find<wbr>Free<wbr>Tasks<wbr>Map<wbr>Entry</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#increaseworkerstask" class="tsd-kind-icon">increase<wbr>Workers<wbr>Task</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#internalexecute" class="tsd-kind-icon">internal<wbr>Execute</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#internalgetbusystatus" class="tsd-kind-icon">internal<wbr>Get<wbr>Busy<wbr>Status</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#ismain" class="tsd-kind-icon">is<wbr>Main</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter">
-                                                               <a href="fixedthreadpool.html#registerworkermessagelistener" class="tsd-kind-icon">register<wbr>Worker<wbr>Message<wbr>Listener</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#removeworker" class="tsd-kind-icon">remove<wbr>Worker</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#sendtoworker" class="tsd-kind-icon">send<wbr>ToWorker</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class">
-                                                               <a href="fixedthreadpool.html#setworkerchoicestrategy" class="tsd-kind-icon">set<wbr>Worker<wbr>Choice<wbr>Strategy</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#setuphook" class="tsd-kind-icon">setup<wbr>Hook</a>
-                                                       </li>
-                                                       <li class=" tsd-kind-method tsd-parent-kind-class tsd-is-protected">
-                                                               <a href="fixedthreadpool.html#workerlistener" class="tsd-kind-icon">worker<wbr>Listener</a>
-                                                       </li>
-                                               </ul>
-                                       </li>
-                               </ul>
-                               <ul class="after-current">
-                                       <li class=" tsd-kind-class tsd-has-type-parameter">
-                                               <a href="threadworker.html" class="tsd-kind-icon">Thread<wbr>Worker</a>
-                                       </li>
-                                       <li class=" tsd-kind-interface">
-                                               <a href="../interfaces/clusterpooloptions.html" class="tsd-kind-icon">Cluster<wbr>Pool<wbr>Options</a>
-                                       </li>
-                                       <li class=" tsd-kind-interface tsd-has-type-parameter">
-                                               <a href="../interfaces/ipool.html" class="tsd-kind-icon">IPool</a>
-                                       </li>
-                                       <li class=" tsd-kind-interface">
-                                               <a href="../interfaces/iworker.html" class="tsd-kind-icon">IWorker</a>
-                                       </li>
-                                       <li class=" tsd-kind-interface tsd-has-type-parameter">
-                                               <a href="../interfaces/pooloptions.html" class="tsd-kind-icon">Pool<wbr>Options</a>
-                                       </li>
-                                       <li class=" tsd-kind-interface">
-                                               <a href="../interfaces/workeroptions.html" class="tsd-kind-icon">Worker<wbr>Options</a>
-                                       </li>
-                                       <li class=" tsd-kind-type-alias tsd-has-type-parameter">
-                                               <a href="../index.html#errorhandler" class="tsd-kind-icon">Error<wbr>Handler</a>
-                                       </li>
-                                       <li class=" tsd-kind-type-alias tsd-has-type-parameter">
-                                               <a href="../index.html#exithandler" class="tsd-kind-icon">Exit<wbr>Handler</a>
-                                       </li>
-                                       <li class=" tsd-kind-type-alias">
-                                               <a href="../index.html#killbehavior" class="tsd-kind-icon">Kill<wbr>Behavior</a>
-                                       </li>
-                                       <li class=" tsd-kind-type-alias tsd-has-type-parameter">
-                                               <a href="../index.html#onlinehandler" class="tsd-kind-icon">Online<wbr>Handler</a>
-                                       </li>
-                                       <li class=" tsd-kind-type-alias">
-                                               <a href="../index.html#threadworkerwithmessagechannel" class="tsd-kind-icon">Thread<wbr>Worker<wbr>With<wbr>Message<wbr>Channel</a>
-                                       </li>
-                                       <li class=" tsd-kind-type-alias">
-                                               <a href="../index.html#workerchoicestrategy" class="tsd-kind-icon">Worker<wbr>Choice<wbr>Strategy</a>
-                                       </li>
-                                       <li class=" tsd-kind-variable">
-                                               <a href="../index.html#killbehaviors" class="tsd-kind-icon">Kill<wbr>Behaviors</a>
-                                       </li>
-                                       <li class=" tsd-kind-variable">
-                                               <a href="../index.html#workerchoicestrategies" class="tsd-kind-icon">Worker<wbr>Choice<wbr>Strategies</a>
-                                       </li>
-                               </ul>
-                       </nav>
-               </div>
-       </div>
-</div>
-<footer class="with-border-bottom">
-       <div class="container">
-               <h2>Legend</h2>
-               <div class="tsd-legend-group">
-                       <ul class="tsd-legend">
-                               <li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
-                               <li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
-                       </ul>
-                       <ul class="tsd-legend">
-                               <li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
-                               <li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
-                       </ul>
-                       <ul class="tsd-legend">
-                               <li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
-                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
-                       </ul>
-                       <ul class="tsd-legend">
-                               <li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
-                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
-                       </ul>
-                       <ul class="tsd-legend">
-                               <li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
-                       </ul>
-               </div>
-       </div>
-</footer>
-<div class="container tsd-generator">
-       <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
-</div>
-<div class="overlay"></div>
-<script src="../assets/js/main.js"></script>
-</body>
-</html>
\ No newline at end of file
+<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FixedThreadPool | poolifier</title><meta name="description" content="Documentation for poolifier"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">poolifier</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../index.html">poolifier</a></li><li><a href="FixedThreadPool.html">FixedThreadPool</a></li></ul><h1>Class FixedThreadPool&lt;Data, Response&gt;</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><div class="lead">
+<p>A thread pool with a fixed number of threads.</p>
+</div><div><p>It is possible to perform tasks in sync or asynchronous mode as you prefer.</p>
+<p>This pool selects the threads in a round robin fashion.</p>
+</div><dl class="tsd-comment-tags"><dt>template DataType</dt><dd><p>of data sent to the worker. This can only be serializable data.</p>
+</dd><dt>template ResponseType</dt><dd><p>of response of execution. This can only be serializable data.</p>
+</dd><dt>author</dt><dd><p><a href="https://github.com/pioardi">Alessandro Pio Ardizio</a></p>
+</dd><dt>since</dt><dd><p>0.0.1</p>
+</dd></dl></div></section><section class="tsd-panel tsd-type-parameters"><h3>Type parameters</h3><ul class="tsd-type-parameters"><li><h4>Data = <span class="tsd-signature-type">unknown</span></h4></li><li><h4>Response = <span class="tsd-signature-type">unknown</span></h4></li></ul></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">AbstractPool</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><ul class="tsd-hierarchy"><li><span class="target">FixedThreadPool</span><ul class="tsd-hierarchy"><li><a href="DynamicThreadPool.html" class="tsd-signature-type" data-tsd-kind="Class">DynamicThreadPool</a></li></ul></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Constructors</h3><ul class="tsd-index-list"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a href="FixedThreadPool.html#constructor" class="tsd-kind-icon">constructor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#emitter" class="tsd-kind-icon">emitter</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#filePath" class="tsd-kind-icon">file<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#max" class="tsd-kind-icon">max</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#nextMessageId" class="tsd-kind-icon">next<wbr/>Message<wbr/>Id</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#numberOfWorkers" class="tsd-kind-icon">number<wbr/>Of<wbr/>Workers</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#opts" class="tsd-kind-icon">opts</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#promiseMap" class="tsd-kind-icon">promise<wbr/>Map</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#tasks" class="tsd-kind-icon">tasks</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#workerChoiceStrategyContext" class="tsd-kind-icon">worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#workers" class="tsd-kind-icon">workers</a></li></ul></section><section class="tsd-index-section "><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><a href="FixedThreadPool.html#busy" class="tsd-kind-icon">busy</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#numberOfRunningTasks" class="tsd-kind-icon">number<wbr/>Of<wbr/>Running<wbr/>Tasks</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><a href="FixedThreadPool.html#type" class="tsd-kind-icon">type</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#afterWorkerSetup" class="tsd-kind-icon">after<wbr/>Worker<wbr/>Setup</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#chooseWorker" class="tsd-kind-icon">choose<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#createAndSetupWorker" class="tsd-kind-icon">create<wbr/>And<wbr/>Setup<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#createWorker" class="tsd-kind-icon">create<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#decreaseWorkersTasks" class="tsd-kind-icon">decrease<wbr/>Workers<wbr/>Tasks</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#destroy" class="tsd-kind-icon">destroy</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="FixedThreadPool.html#destroyWorker" class="tsd-kind-icon">destroy<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#execute" class="tsd-kind-icon">execute</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#findFreeTasksMapEntry" class="tsd-kind-icon">find<wbr/>Free<wbr/>Tasks<wbr/>Map<wbr/>Entry</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#increaseWorkersTask" class="tsd-kind-icon">increase<wbr/>Workers<wbr/>Task</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#internalExecute" class="tsd-kind-icon">internal<wbr/>Execute</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#internalGetBusyStatus" class="tsd-kind-icon">internal<wbr/>Get<wbr/>Busy<wbr/>Status</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#isMain" class="tsd-kind-icon">is<wbr/>Main</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a href="FixedThreadPool.html#registerWorkerMessageListener" class="tsd-kind-icon">register<wbr/>Worker<wbr/>Message<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#removeWorker" class="tsd-kind-icon">remove<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#sendToWorker" class="tsd-kind-icon">send<wbr/>To<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#setWorkerChoiceStrategy" class="tsd-kind-icon">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#setupHook" class="tsd-kind-icon">setup<wbr/>Hook</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#workerListener" class="tsd-kind-icon">worker<wbr/>Listener</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Constructors</h2><section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a id="constructor" class="tsd-anchor"></a><h3>constructor</h3><ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">new <wbr/>Fixed<wbr/>Thread<wbr/>Pool<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>numberOfThreads<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, filePath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, opts<span class="tsd-signature-symbol">?: </span><a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FixedThreadPool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedThreadPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool&lt;ThreadWorkerWithMessageChannel, Data, Response&gt;.constructor</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L35">src/pools/thread/fixed.ts:35</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Constructs a new poolifier fixed thread pool.</p>
+</div></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>Data = <span class="tsd-signature-type">unknown</span></h4></li><li><h4>Response = <span class="tsd-signature-type">unknown</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>numberOfThreads: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Number of threads for this pool.</p>
+</div></div></li><li><h5>filePath: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Path to an implementation of a <code>ThreadWorker</code> file, which can be relative or absolute.</p>
+</div></div></li><li><h5>opts: <a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = {}</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FixedThreadPool.html" class="tsd-signature-type" data-tsd-kind="Class">FixedThreadPool</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="emitter" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> emitter</h3><div class="tsd-signature tsd-kind-icon">emitter<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">PoolEmitter</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.emitter</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L127">src/pools/abstract-pool.ts:127</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="filePath" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> file<wbr/>Path</h3><div class="tsd-signature tsd-kind-icon">file<wbr/>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.filePath</p></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="max" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> max</h3><div class="tsd-signature tsd-kind-icon">max<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.max</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L130">src/pools/abstract-pool.ts:130</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="nextMessageId" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> next<wbr/>Message<wbr/>Id</h3><div class="tsd-signature tsd-kind-icon">next<wbr/>Message<wbr/>Id<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.nextMessageId</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L148">src/pools/abstract-pool.ts:148</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Id of the next message.</p>
+</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="numberOfWorkers" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> number<wbr/>Of<wbr/>Workers</h3><div class="tsd-signature tsd-kind-icon">number<wbr/>Of<wbr/>Workers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.numberOfWorkers</p></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="opts" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> opts</h3><div class="tsd-signature tsd-kind-icon">opts<span class="tsd-signature-symbol">:</span> <a href="../interfaces/PoolOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">PoolOptions</a><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.opts</p></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="promiseMap" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> promise<wbr/>Map</h3><div class="tsd-signature tsd-kind-icon">promise<wbr/>Map<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">number</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">PromiseWorkerResponseWrapper</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.promiseMap</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L140">src/pools/abstract-pool.ts:140</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>The promise map.</p>
+</div><div><ul>
+<li><code>key</code>: This is the message Id of each submitted task.</li>
+<li><code>value</code>: An object that contains the worker, the resolve function and the reject function.</li>
+</ul>
+<p>When we receive a message from the worker we get a map entry and resolve/reject the promise based on the message.</p>
+</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="tasks" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> tasks</h3><div class="tsd-signature tsd-kind-icon">tasks<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.tasks</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L124">src/pools/abstract-pool.ts:124</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="workerChoiceStrategyContext" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</h3><div class="tsd-signature tsd-kind-icon">worker<wbr/>Choice<wbr/>Strategy<wbr/>Context<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WorkerChoiceStrategyContext</span><span class="tsd-signature-symbol">&lt;</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.workerChoiceStrategyContext</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L155">src/pools/abstract-pool.ts:155</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Worker choice strategy instance implementing the worker choice algorithm.</p>
+</div><div><p>Default to a strategy implementing a round robin algorithm.</p>
+</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a id="workers" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagReadonly">Readonly</span> workers</h3><div class="tsd-signature tsd-kind-icon">workers<span class="tsd-signature-symbol">:</span> <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></div><aside class="tsd-sources"><p>Inherited from AbstractPool.workers</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L121">src/pools/abstract-pool.ts:121</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><a id="busy" class="tsd-anchor"></a><h3>busy</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> busy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.busy</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L95">src/pools/thread/fixed.ts:95</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="numberOfRunningTasks" class="tsd-anchor"></a><h3>number<wbr/>Of<wbr/>Running<wbr/>Tasks</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> numberOfRunningTasks<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></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.numberOfRunningTasks</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L242">src/pools/abstract-pool.ts:242</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><a id="type" class="tsd-anchor"></a><h3>type</h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> type<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PoolType</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.type</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L90">src/pools/thread/fixed.ts:90</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">PoolType</span></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a id="afterWorkerSetup" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> after<wbr/>Worker<wbr/>Setup</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><li class="tsd-signature tsd-kind-icon">after<wbr/>Worker<wbr/>Setup<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.afterWorkerSetup</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L80">src/pools/thread/fixed.ts:80</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="chooseWorker" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> choose<wbr/>Worker</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">choose<wbr/>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.chooseWorker</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L365">src/pools/abstract-pool.ts:365</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Choose a worker for the next task.</p>
+</div><div><p>The default implementation uses a round robin algorithm to distribute the load.</p>
+</div></div><h4 class="tsd-returns-title">Returns <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h4><div><p>Worker.</p>
+</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="createAndSetupWorker" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> create<wbr/>And<wbr/>Setup<wbr/>Worker</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">create<wbr/>And<wbr/>Setup<wbr/>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.createAndSetupWorker</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L419">src/pools/abstract-pool.ts:419</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Creates a new worker for this pool and sets it up completely.</p>
+</div></div><h4 class="tsd-returns-title">Returns <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h4><div><p>New, completely set up worker.</p>
+</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a id="createWorker" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> create<wbr/>Worker</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><li class="tsd-signature tsd-kind-icon">create<wbr/>Worker<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.createWorker</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L73">src/pools/thread/fixed.ts:73</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-returns-title">Returns <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="decreaseWorkersTasks" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> decrease<wbr/>Workers<wbr/>Tasks</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">decrease<wbr/>Workers<wbr/>Tasks<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.decreaseWorkersTasks</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L327">src/pools/abstract-pool.ts:327</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Decrease the number of tasks that the given worker has applied.</p>
+</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Worker whose tasks are decreased.</p>
+</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="destroy" class="tsd-anchor"></a><h3>destroy</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">destroy<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.destroy</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L289">src/pools/abstract-pool.ts:289</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></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></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="destroyWorker" class="tsd-anchor"></a><h3>destroy<wbr/>Worker</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">destroy<wbr/>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.destroyWorker</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L49">src/pools/thread/fixed.ts:49</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5></li></ul><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></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="execute" class="tsd-anchor"></a><h3>execute</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">execute<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">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" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.execute</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L278">src/pools/abstract-pool.ts:278</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>data: <span class="tsd-signature-type" data-tsd-kind="Type parameter">Data</span></h5></li></ul><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" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="findFreeTasksMapEntry" class="tsd-anchor"></a><h3>find<wbr/>Free<wbr/>Tasks<wbr/>Map<wbr/>Entry</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">find<wbr/>Free<wbr/>Tasks<wbr/>Map<wbr/>Entry<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.findFreeTasksMapEntry</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L267">src/pools/abstract-pool.ts:267</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">false</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-symbol">[</span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="increaseWorkersTask" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> increase<wbr/>Workers<wbr/>Task</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">increase<wbr/>Workers<wbr/>Task<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.increaseWorkersTask</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L318">src/pools/abstract-pool.ts:318</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Increase the number of tasks that the given worker has applied.</p>
+</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Worker whose tasks are increased.</p>
+</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="internalExecute" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> internal<wbr/>Execute</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">internal<wbr/>Execute<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a>, messageId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</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" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.internalExecute</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L390">src/pools/abstract-pool.ts:390</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5></li><li><h5>messageId: <span class="tsd-signature-type">number</span></h5></li></ul><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" data-tsd-kind="Type parameter">Response</span><span class="tsd-signature-symbol">&gt;</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="internalGetBusyStatus" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> internal<wbr/>Get<wbr/>Busy<wbr/>Status</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">internal<wbr/>Get<wbr/>Busy<wbr/>Status<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.internalGetBusyStatus</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L259">src/pools/abstract-pool.ts:259</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a id="isMain" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> is<wbr/>Main</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><li class="tsd-signature tsd-kind-icon">is<wbr/>Main<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.isMain</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L44">src/pools/thread/fixed.ts:44</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a id="registerWorkerMessageListener" class="tsd-anchor"></a><h3>register<wbr/>Worker<wbr/>Message<wbr/>Listener</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">register<wbr/>Worker<wbr/>Message<wbr/>Listener<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Message</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>messageChannel<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.registerWorkerMessageListener</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L65">src/pools/thread/fixed.ts:65</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>Message</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>messageChannel: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">Message</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">&gt;</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="removeWorker" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> remove<wbr/>Worker</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">remove<wbr/>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.removeWorker</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L351">src/pools/abstract-pool.ts:351</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Removes the given worker from the pool.</p>
+</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Worker that will be removed.</p>
+</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a id="sendToWorker" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> send<wbr/>To<wbr/>Worker</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><li class="tsd-signature tsd-kind-icon">send<wbr/>To<wbr/>Worker<span class="tsd-signature-symbol">(</span>worker<span class="tsd-signature-symbol">: </span><a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a>, message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides AbstractPool.sendToWorker</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/thread/fixed.ts#L57">src/pools/thread/fixed.ts:57</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>worker: <a href="../index.html#ThreadWorkerWithMessageChannel" class="tsd-signature-type" data-tsd-kind="Type alias">ThreadWorkerWithMessageChannel</a></h5></li><li><h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-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></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="setWorkerChoiceStrategy" class="tsd-anchor"></a><h3>set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy<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_RECENTLY_USED&quot;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.setWorkerChoiceStrategy</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L247">src/pools/abstract-pool.ts:247</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>inheritdoc</dt><dd></dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><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_RECENTLY_USED&quot;</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="setupHook" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> setup<wbr/>Hook</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">setup<wbr/>Hook<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.setupHook</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L304">src/pools/abstract-pool.ts:304</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>Setup hook that can be overridden by a Poolifier pool implementation
+to run code before workers are created in the abstract constructor.</p>
+</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a id="workerListener" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagProtected">Protected</span> worker<wbr/>Listener</h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><li class="tsd-signature tsd-kind-icon">worker<wbr/>Listener<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractPool.workerListener</p><ul><li>Defined in <a href="https://github.com/jerome-benoit/poolifier/blob/72ddc5c/src/pools/abstract-pool.ts#L443">src/pools/abstract-pool.ts:443</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
+<p>This function is the listener registered for each worker.</p>
+</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> =&gt; </span><span class="tsd-signature-type">void</span></h4><div><p>The listener function to execute when a message is sent from a worker.</p>
+</div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>message<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-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><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead">
+<p>This function is the listener registered for each worker.</p>
+</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>message: <span class="tsd-signature-type">MessageValue</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-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></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div><p>The listener function to execute when a message is sent from a worker.</p>
+</div></li></ul></li></ul></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../index.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-has-type-parameter"><a href="FixedThreadPool.html" class="tsd-kind-icon">Fixed<wbr/>Thread<wbr/>Pool</a><ul><li class="tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a href="FixedThreadPool.html#constructor" class="tsd-kind-icon">constructor</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#emitter" class="tsd-kind-icon">emitter</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#filePath" class="tsd-kind-icon">file<wbr/>Path</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#max" class="tsd-kind-icon">max</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#nextMessageId" class="tsd-kind-icon">next<wbr/>Message<wbr/>Id</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#numberOfWorkers" class="tsd-kind-icon">number<wbr/>Of<wbr/>Workers</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#opts" class="tsd-kind-icon">opts</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#promiseMap" class="tsd-kind-icon">promise<wbr/>Map</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#tasks" class="tsd-kind-icon">tasks</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#workerChoiceStrategyContext" class="tsd-kind-icon">worker<wbr/>Choice<wbr/>Strategy<wbr/>Context</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#workers" class="tsd-kind-icon">workers</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><a href="FixedThreadPool.html#busy" class="tsd-kind-icon">busy</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#numberOfRunningTasks" class="tsd-kind-icon">number<wbr/>Of<wbr/>Running<wbr/>Tasks</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-overwrite"><a href="FixedThreadPool.html#type" class="tsd-kind-icon">type</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#afterWorkerSetup" class="tsd-kind-icon">after<wbr/>Worker<wbr/>Setup</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#chooseWorker" class="tsd-kind-icon">choose<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#createAndSetupWorker" class="tsd-kind-icon">create<wbr/>And<wbr/>Setup<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#createWorker" class="tsd-kind-icon">create<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#decreaseWorkersTasks" class="tsd-kind-icon">decrease<wbr/>Workers<wbr/>Tasks</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#destroy" class="tsd-kind-icon">destroy</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="FixedThreadPool.html#destroyWorker" class="tsd-kind-icon">destroy<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#execute" class="tsd-kind-icon">execute</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#findFreeTasksMapEntry" class="tsd-kind-icon">find<wbr/>Free<wbr/>Tasks<wbr/>Map<wbr/>Entry</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#increaseWorkersTask" class="tsd-kind-icon">increase<wbr/>Workers<wbr/>Task</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#internalExecute" class="tsd-kind-icon">internal<wbr/>Execute</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#internalGetBusyStatus" class="tsd-kind-icon">internal<wbr/>Get<wbr/>Busy<wbr/>Status</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#isMain" class="tsd-kind-icon">is<wbr/>Main</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a href="FixedThreadPool.html#registerWorkerMessageListener" class="tsd-kind-icon">register<wbr/>Worker<wbr/>Message<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#removeWorker" class="tsd-kind-icon">remove<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected"><a href="FixedThreadPool.html#sendToWorker" class="tsd-kind-icon">send<wbr/>To<wbr/>Worker</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FixedThreadPool.html#setWorkerChoiceStrategy" class="tsd-kind-icon">set<wbr/>Worker<wbr/>Choice<wbr/>Strategy</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#setupHook" class="tsd-kind-icon">setup<wbr/>Hook</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected"><a href="FixedThreadPool.html#workerListener" class="tsd-kind-icon">worker<wbr/>Listener</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
\ No newline at end of file