Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git] / docs / variables / WorkerChoiceStrategies.html
CommitLineData
671da681
JB
1<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WorkerChoiceStrategies | 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.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2<div class="tsd-toolbar-contents container">
3<div class="table-cell" id="tsd-search" data-base="..">
41015374
JB
4<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5<div class="field">
6<div id="tsd-toolbar-links"></div></div>
671da681
JB
7<ul class="results">
8<li class="state loading">Preparing search index...</li>
41015374
JB
9<li class="state failure">The search index is not available</li></ul><a href="" class="title">poolifier</a></div>
10<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
671da681
JB
11<div class="container container-main">
12<div class="col-8 col-content">
13<div class="tsd-page-title">
14<ul class="tsd-breadcrumb">
15<li><a href="../index.html">poolifier</a></li>
16<li><a href="WorkerChoiceStrategies.html">WorkerChoiceStrategies</a></li></ul>
17<h1>Variable WorkerChoiceStrategies<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
41015374 18<div class="tsd-signature">Worker<wbr/>Choice<wbr/>Strategies<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Readonly</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{ </span><br/><span>    </span>FAIR_SHARE<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;FAIR_SHARE&quot;</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>LESS_RECENTLY_USED<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;LESS_RECENTLY_USED&quot;</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>ROUND_ROBIN<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol">; </span><br/><span>    </span>WEIGHTED_ROUND_ROBIN<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">&quot;WEIGHTED_ROUND_ROBIN&quot;</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = ...</span></div>
671da681
JB
19<div class="tsd-comment tsd-typography"><p>Enumeration of worker choice strategies.</p>
20</div><aside class="tsd-sources">
21<ul>
402f08b7 22<li>Defined in <a href="https://github.com/poolifier/poolifier/blob/f44936a/src/pools/selection-strategies/selection-strategies-types.ts#L6">src/pools/selection-strategies/selection-strategies-types.ts:6</a></li></ul></aside></div>
671da681
JB
23<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
24<div class="tsd-navigation settings">
25<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
26<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
27<div class="tsd-accordion-details">
28<div class="tsd-filter-visibility">
29<h4 class="uppercase">Member Visibility</h4><form>
30<ul id="tsd-filter-options">
31<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
32<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
33<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
34<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
35<div class="tsd-theme-toggle">
36<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
37<nav class="tsd-navigation primary">
38<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
39<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
40<div class="tsd-accordion-details">
41<ul>
42<li><a href="../index.html">poolifier</a>
43<ul></ul></li></ul></div></details></nav>
44<nav class="tsd-navigation secondary menu-sticky">
45<ul>
41015374 46<li class="tsd-kind-class"><a href="../classes/ClusterWorker.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg>Cluster<wbr/>Worker</a></li>
671da681
JB
47<li class="tsd-kind-class"><a href="../classes/DynamicClusterPool.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Dynamic<wbr/>Cluster<wbr/>Pool</a></li>
48<li class="tsd-kind-class"><a href="../classes/DynamicThreadPool.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Dynamic<wbr/>Thread<wbr/>Pool</a></li>
49<li class="tsd-kind-class"><a href="../classes/FixedClusterPool.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Fixed<wbr/>Cluster<wbr/>Pool</a></li>
50<li class="tsd-kind-class"><a href="../classes/FixedThreadPool.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Fixed<wbr/>Thread<wbr/>Pool</a></li>
41015374 51<li class="tsd-kind-class"><a href="../classes/PoolEmitter.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Pool<wbr/>Emitter</a></li>
671da681
JB
52<li class="tsd-kind-class"><a href="../classes/ThreadWorker.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-128-path"></use><use href="#icon-128-text"></use></svg>Thread<wbr/>Worker</a></li>
53<li class="tsd-kind-interface"><a href="../interfaces/ClusterPoolOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg>Cluster<wbr/>Pool<wbr/>Options</a></li>
54<li class="tsd-kind-interface"><a href="../interfaces/IPool.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>IPool</a></li>
671da681
JB
55<li class="tsd-kind-interface"><a href="../interfaces/PoolOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Pool<wbr/>Options</a></li>
56<li class="tsd-kind-interface"><a href="../interfaces/WorkerOptions.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg>Worker<wbr/>Options</a></li>
57<li class="tsd-kind-type-alias"><a href="../types/ErrorHandler.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg>Error<wbr/>Handler</a></li>
58<li class="tsd-kind-type-alias"><a href="../types/ExitHandler.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Exit<wbr/>Handler</a></li>
59<li class="tsd-kind-type-alias"><a href="../types/KillBehavior.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Kill<wbr/>Behavior</a></li>
ed1ecf09 60<li class="tsd-kind-type-alias"><a href="../types/MessageHandler.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Message<wbr/>Handler</a></li>
671da681
JB
61<li class="tsd-kind-type-alias"><a href="../types/OnlineHandler.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Online<wbr/>Handler</a></li>
62<li class="tsd-kind-type-alias"><a href="../types/ThreadWorkerWithMessageChannel.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Thread<wbr/>Worker<wbr/>With<wbr/>Message<wbr/>Channel</a></li>
63<li class="tsd-kind-type-alias"><a href="../types/WorkerChoiceStrategy.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg>Worker<wbr/>Choice<wbr/>Strategy</a></li>
64<li class="tsd-kind-variable"><a href="KillBehaviors.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg>Kill<wbr/>Behaviors</a></li>
65<li class="current tsd-kind-variable"><a href="WorkerChoiceStrategies.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>Worker<wbr/>Choice<wbr/>Strategies</a></li></ul></nav></div></div>
66<div class="container tsd-generator">
67<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
68<div class="overlay"></div><script src="../assets/main.js"></script></body></html>