From 7c0ba92006a5c188738ffc5ff642c51f172df3d6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 6 Mar 2021 21:08:08 +0100 Subject: [PATCH] Pool busy event emitting on all pool types (#241) Co-authored-by: Shinigami Co-authored-by: Shinigami92 --- CHANGELOG.md | 2 +- .../versus-external-pools/BENCH-100000.MD | 18 +- docs/_config.yml | 2 +- docs/assets/js/search.js | 2 +- docs/classes/abstractworker.html | 26 +-- docs/classes/clusterworker.html | 24 +-- docs/classes/dynamicclusterpool.html | 179 +++++++++++++---- docs/classes/dynamicthreadpool.html | 179 +++++++++++++---- docs/classes/fixedclusterpool.html | 190 ++++++++++++++---- docs/classes/fixedthreadpool.html | 190 ++++++++++++++---- docs/classes/threadworker.html | 24 +-- docs/index.html | 16 +- docs/interfaces/clusterpooloptions.html | 31 ++- docs/interfaces/ipool.html | 6 +- docs/interfaces/iworker.html | 8 +- docs/interfaces/pooloptions.html | 28 ++- docs/interfaces/workeroptions.html | 6 +- package.json | 1 + src/pools/abstract-pool.ts | 65 +++++- src/pools/cluster/dynamic.ts | 10 +- src/pools/cluster/fixed.ts | 11 + src/pools/pool-internal.ts | 39 +++- src/pools/selection-strategies.ts | 44 +--- src/pools/thread/dynamic.ts | 10 +- src/pools/thread/fixed.ts | 11 + tests/pools/abstract/abstract-pool.test.js | 53 ++++- tests/pools/cluster/dynamic.test.js | 6 +- tests/pools/cluster/fixed.test.js | 17 +- tests/pools/thread/dynamic.test.js | 6 +- tests/pools/thread/fixed.test.js | 44 +++- tests/worker-files/thread/asyncErrorWorker.js | 14 ++ tests/worker-files/thread/errorWorker.js | 1 + 32 files changed, 973 insertions(+), 290 deletions(-) create mode 100644 tests/worker-files/thread/asyncErrorWorker.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 49f58dc1..211ade56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Breaking Changes -- `FullPool` event is now renamed to `busy`. +- `FullPool` event is now renamed to `busy` and emitted on all pool types. - `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`. _Find more details on our JSDoc._ diff --git a/benchmarks/versus-external-pools/BENCH-100000.MD b/benchmarks/versus-external-pools/BENCH-100000.MD index 180a1634..5aa5adad 100644 --- a/benchmarks/versus-external-pools/BENCH-100000.MD +++ b/benchmarks/versus-external-pools/BENCH-100000.MD @@ -1,9 +1,9 @@ -| Command | Mean [s] | Min [s] | Max [s] | Relative | -|:---|---:|---:|---:|---:| -| `node dynamic-piscina.js` | 47.192 ± 0.607 | 46.774 | 48.804 | 1.07 ± 0.01 | -| `node fixed-piscina.js` | 47.046 ± 0.112 | 46.823 | 47.178 | 1.07 ± 0.00 | -| `node dynamic-poolifier.js` | 44.301 ± 0.989 | 43.718 | 46.994 | 1.00 ± 0.02 | -| `node fixed-poolifier.js` | 44.115 ± 0.174 | 43.843 | 44.510 | 1.00 | -| `node static-suchmokuo-node-worker-threads-pool.js` | 48.282 ± 1.857 | 46.361 | 50.268 | 1.09 ± 0.04 | -| `node dynamic-suchmokuo-node-worker-threads-pool.js` | 60.111 ± 2.401 | 57.752 | 63.011 | 1.36 ± 0.05 | -| `node threadjs.js` | 131.412 ± 4.210 | 122.872 | 138.506 | 2.98 ± 0.10 | +| Command | Mean [s] | Min [s] | Max [s] | Relative | +| :--------------------------------------------------- | --------------: | ------: | ------: | ----------: | +| `node dynamic-piscina.js` | 47.192 ± 0.607 | 46.774 | 48.804 | 1.07 ± 0.01 | +| `node fixed-piscina.js` | 47.046 ± 0.112 | 46.823 | 47.178 | 1.07 ± 0.00 | +| `node dynamic-poolifier.js` | 44.301 ± 0.989 | 43.718 | 46.994 | 1.00 ± 0.02 | +| `node fixed-poolifier.js` | 44.115 ± 0.174 | 43.843 | 44.510 | 1.00 | +| `node static-suchmokuo-node-worker-threads-pool.js` | 48.282 ± 1.857 | 46.361 | 50.268 | 1.09 ± 0.04 | +| `node dynamic-suchmokuo-node-worker-threads-pool.js` | 60.111 ± 2.401 | 57.752 | 63.011 | 1.36 ± 0.05 | +| `node threadjs.js` | 131.412 ± 4.210 | 122.872 | 138.506 | 2.98 ± 0.10 | diff --git a/docs/_config.yml b/docs/_config.yml index fc24e7a6..8bbf7943 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -1 +1 @@ -theme: jekyll-theme-hacker \ No newline at end of file +theme: jekyll-theme-hacker diff --git a/docs/assets/js/search.js b/docs/assets/js/search.js index 90867cb6..df441e51 100644 --- a/docs/assets/js/search.js +++ b/docs/assets/js/search.js @@ -1 +1 @@ -window.searchData = {"kinds":{"32":"Variable","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"ErrorHandler","url":"index.html#errorhandler","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":1,"kind":65536,"name":"__type","url":"index.html#errorhandler.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"ErrorHandler"},{"id":2,"kind":4194304,"name":"ExitHandler","url":"index.html#exithandler","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":3,"kind":65536,"name":"__type","url":"index.html#exithandler.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"ExitHandler"},{"id":4,"kind":256,"name":"IWorker","url":"interfaces/iworker.html","classes":"tsd-kind-interface"},{"id":5,"kind":2048,"name":"on","url":"interfaces/iworker.html#on","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IWorker"},{"id":6,"kind":2048,"name":"once","url":"interfaces/iworker.html#once","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IWorker"},{"id":7,"kind":4194304,"name":"OnlineHandler","url":"index.html#onlinehandler","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":8,"kind":65536,"name":"__type","url":"index.html#onlinehandler.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"OnlineHandler"},{"id":9,"kind":256,"name":"PoolOptions","url":"interfaces/pooloptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":10,"kind":1024,"name":"errorHandler","url":"interfaces/pooloptions.html#errorhandler","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":11,"kind":1024,"name":"onlineHandler","url":"interfaces/pooloptions.html#onlinehandler","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":12,"kind":1024,"name":"exitHandler","url":"interfaces/pooloptions.html#exithandler","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":13,"kind":1024,"name":"workerChoiceStrategy","url":"interfaces/pooloptions.html#workerchoicestrategy","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":14,"kind":128,"name":"DynamicClusterPool","url":"classes/dynamicclusterpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":15,"kind":512,"name":"constructor","url":"classes/dynamicclusterpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicClusterPool"},{"id":16,"kind":1024,"name":"max","url":"classes/dynamicclusterpool.html#max","classes":"tsd-kind-property tsd-parent-kind-class","parent":"DynamicClusterPool"},{"id":17,"kind":262144,"name":"dynamic","url":"classes/dynamicclusterpool.html#dynamic","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":18,"kind":1024,"name":"opts","url":"classes/dynamicclusterpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":19,"kind":2048,"name":"setupHook","url":"classes/dynamicclusterpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":20,"kind":2048,"name":"isMain","url":"classes/dynamicclusterpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":21,"kind":2048,"name":"destroyWorker","url":"classes/dynamicclusterpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":22,"kind":2048,"name":"sendToWorker","url":"classes/dynamicclusterpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":23,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/dynamicclusterpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicClusterPool"},{"id":24,"kind":2048,"name":"createWorker","url":"classes/dynamicclusterpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":25,"kind":2048,"name":"afterWorkerSetup","url":"classes/dynamicclusterpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":26,"kind":1024,"name":"workers","url":"classes/dynamicclusterpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":27,"kind":1024,"name":"tasks","url":"classes/dynamicclusterpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":28,"kind":1024,"name":"emitter","url":"classes/dynamicclusterpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":29,"kind":1024,"name":"promiseMap","url":"classes/dynamicclusterpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":30,"kind":1024,"name":"nextMessageId","url":"classes/dynamicclusterpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":31,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/dynamicclusterpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":32,"kind":1024,"name":"numberOfWorkers","url":"classes/dynamicclusterpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":33,"kind":1024,"name":"filePath","url":"classes/dynamicclusterpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":34,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/dynamicclusterpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":35,"kind":2048,"name":"execute","url":"classes/dynamicclusterpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":36,"kind":2048,"name":"destroy","url":"classes/dynamicclusterpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":37,"kind":2048,"name":"increaseWorkersTask","url":"classes/dynamicclusterpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":38,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/dynamicclusterpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":39,"kind":2048,"name":"removeWorker","url":"classes/dynamicclusterpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":40,"kind":2048,"name":"chooseWorker","url":"classes/dynamicclusterpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":41,"kind":2048,"name":"internalExecute","url":"classes/dynamicclusterpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":42,"kind":2048,"name":"createAndSetupWorker","url":"classes/dynamicclusterpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":43,"kind":2048,"name":"workerListener","url":"classes/dynamicclusterpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":44,"kind":128,"name":"FixedClusterPool","url":"classes/fixedclusterpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":45,"kind":512,"name":"constructor","url":"classes/fixedclusterpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedClusterPool"},{"id":46,"kind":1024,"name":"opts","url":"classes/fixedclusterpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":47,"kind":2048,"name":"setupHook","url":"classes/fixedclusterpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":48,"kind":2048,"name":"isMain","url":"classes/fixedclusterpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":49,"kind":2048,"name":"destroyWorker","url":"classes/fixedclusterpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":50,"kind":2048,"name":"sendToWorker","url":"classes/fixedclusterpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":51,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/fixedclusterpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedClusterPool"},{"id":52,"kind":2048,"name":"createWorker","url":"classes/fixedclusterpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":53,"kind":2048,"name":"afterWorkerSetup","url":"classes/fixedclusterpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":54,"kind":1024,"name":"workers","url":"classes/fixedclusterpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":55,"kind":1024,"name":"tasks","url":"classes/fixedclusterpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":56,"kind":1024,"name":"emitter","url":"classes/fixedclusterpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":57,"kind":1024,"name":"promiseMap","url":"classes/fixedclusterpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":58,"kind":1024,"name":"nextMessageId","url":"classes/fixedclusterpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":59,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/fixedclusterpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":60,"kind":1024,"name":"numberOfWorkers","url":"classes/fixedclusterpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":61,"kind":1024,"name":"filePath","url":"classes/fixedclusterpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":62,"kind":262144,"name":"dynamic","url":"classes/fixedclusterpool.html#dynamic","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":63,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/fixedclusterpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":64,"kind":2048,"name":"execute","url":"classes/fixedclusterpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":65,"kind":2048,"name":"destroy","url":"classes/fixedclusterpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":66,"kind":2048,"name":"increaseWorkersTask","url":"classes/fixedclusterpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":67,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/fixedclusterpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":68,"kind":2048,"name":"removeWorker","url":"classes/fixedclusterpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":69,"kind":2048,"name":"chooseWorker","url":"classes/fixedclusterpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":70,"kind":2048,"name":"internalExecute","url":"classes/fixedclusterpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":71,"kind":2048,"name":"createAndSetupWorker","url":"classes/fixedclusterpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":72,"kind":2048,"name":"workerListener","url":"classes/fixedclusterpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":73,"kind":256,"name":"ClusterPoolOptions","url":"interfaces/clusterpooloptions.html","classes":"tsd-kind-interface"},{"id":74,"kind":1024,"name":"env","url":"interfaces/clusterpooloptions.html#env","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ClusterPoolOptions"},{"id":75,"kind":1024,"name":"errorHandler","url":"interfaces/clusterpooloptions.html#errorhandler","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":76,"kind":1024,"name":"onlineHandler","url":"interfaces/clusterpooloptions.html#onlinehandler","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":77,"kind":1024,"name":"exitHandler","url":"interfaces/clusterpooloptions.html#exithandler","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":78,"kind":1024,"name":"workerChoiceStrategy","url":"interfaces/clusterpooloptions.html#workerchoicestrategy","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":79,"kind":256,"name":"IPool","url":"interfaces/ipool.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":80,"kind":2048,"name":"execute","url":"interfaces/ipool.html#execute","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IPool"},{"id":81,"kind":2048,"name":"destroy","url":"interfaces/ipool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IPool"},{"id":82,"kind":2048,"name":"setWorkerChoiceStrategy","url":"interfaces/ipool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IPool"},{"id":83,"kind":32,"name":"WorkerChoiceStrategies","url":"index.html#workerchoicestrategies","classes":"tsd-kind-variable"},{"id":84,"kind":4194304,"name":"WorkerChoiceStrategy","url":"index.html#workerchoicestrategy","classes":"tsd-kind-type-alias"},{"id":85,"kind":128,"name":"DynamicThreadPool","url":"classes/dynamicthreadpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":86,"kind":512,"name":"constructor","url":"classes/dynamicthreadpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicThreadPool"},{"id":87,"kind":1024,"name":"max","url":"classes/dynamicthreadpool.html#max","classes":"tsd-kind-property tsd-parent-kind-class","parent":"DynamicThreadPool"},{"id":88,"kind":262144,"name":"dynamic","url":"classes/dynamicthreadpool.html#dynamic","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":89,"kind":2048,"name":"isMain","url":"classes/dynamicthreadpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":90,"kind":2048,"name":"destroyWorker","url":"classes/dynamicthreadpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":91,"kind":2048,"name":"sendToWorker","url":"classes/dynamicthreadpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":92,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/dynamicthreadpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicThreadPool"},{"id":93,"kind":2048,"name":"createWorker","url":"classes/dynamicthreadpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":94,"kind":2048,"name":"afterWorkerSetup","url":"classes/dynamicthreadpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":95,"kind":1024,"name":"workers","url":"classes/dynamicthreadpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":96,"kind":1024,"name":"tasks","url":"classes/dynamicthreadpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":97,"kind":1024,"name":"emitter","url":"classes/dynamicthreadpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":98,"kind":1024,"name":"promiseMap","url":"classes/dynamicthreadpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":99,"kind":1024,"name":"nextMessageId","url":"classes/dynamicthreadpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":100,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/dynamicthreadpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":101,"kind":1024,"name":"numberOfWorkers","url":"classes/dynamicthreadpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":102,"kind":1024,"name":"filePath","url":"classes/dynamicthreadpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":103,"kind":1024,"name":"opts","url":"classes/dynamicthreadpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":104,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/dynamicthreadpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":105,"kind":2048,"name":"execute","url":"classes/dynamicthreadpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":106,"kind":2048,"name":"destroy","url":"classes/dynamicthreadpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":107,"kind":2048,"name":"setupHook","url":"classes/dynamicthreadpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":108,"kind":2048,"name":"increaseWorkersTask","url":"classes/dynamicthreadpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":109,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/dynamicthreadpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":110,"kind":2048,"name":"removeWorker","url":"classes/dynamicthreadpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":111,"kind":2048,"name":"chooseWorker","url":"classes/dynamicthreadpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":112,"kind":2048,"name":"internalExecute","url":"classes/dynamicthreadpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":113,"kind":2048,"name":"createAndSetupWorker","url":"classes/dynamicthreadpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":114,"kind":2048,"name":"workerListener","url":"classes/dynamicthreadpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":115,"kind":128,"name":"FixedThreadPool","url":"classes/fixedthreadpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":116,"kind":512,"name":"constructor","url":"classes/fixedthreadpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedThreadPool"},{"id":117,"kind":2048,"name":"isMain","url":"classes/fixedthreadpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":118,"kind":2048,"name":"destroyWorker","url":"classes/fixedthreadpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":119,"kind":2048,"name":"sendToWorker","url":"classes/fixedthreadpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":120,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/fixedthreadpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedThreadPool"},{"id":121,"kind":2048,"name":"createWorker","url":"classes/fixedthreadpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":122,"kind":2048,"name":"afterWorkerSetup","url":"classes/fixedthreadpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":123,"kind":1024,"name":"workers","url":"classes/fixedthreadpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":124,"kind":1024,"name":"tasks","url":"classes/fixedthreadpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":125,"kind":1024,"name":"emitter","url":"classes/fixedthreadpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":126,"kind":1024,"name":"promiseMap","url":"classes/fixedthreadpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":127,"kind":1024,"name":"nextMessageId","url":"classes/fixedthreadpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":128,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/fixedthreadpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":129,"kind":1024,"name":"numberOfWorkers","url":"classes/fixedthreadpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":130,"kind":1024,"name":"filePath","url":"classes/fixedthreadpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":131,"kind":1024,"name":"opts","url":"classes/fixedthreadpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":132,"kind":262144,"name":"dynamic","url":"classes/fixedthreadpool.html#dynamic","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":133,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/fixedthreadpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":134,"kind":2048,"name":"execute","url":"classes/fixedthreadpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":135,"kind":2048,"name":"destroy","url":"classes/fixedthreadpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":136,"kind":2048,"name":"setupHook","url":"classes/fixedthreadpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":137,"kind":2048,"name":"increaseWorkersTask","url":"classes/fixedthreadpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":138,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/fixedthreadpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":139,"kind":2048,"name":"removeWorker","url":"classes/fixedthreadpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":140,"kind":2048,"name":"chooseWorker","url":"classes/fixedthreadpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":141,"kind":2048,"name":"internalExecute","url":"classes/fixedthreadpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":142,"kind":2048,"name":"createAndSetupWorker","url":"classes/fixedthreadpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":143,"kind":2048,"name":"workerListener","url":"classes/fixedthreadpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":144,"kind":4194304,"name":"ThreadWorkerWithMessageChannel","url":"index.html#threadworkerwithmessagechannel","classes":"tsd-kind-type-alias"},{"id":145,"kind":128,"name":"AbstractWorker","url":"classes/abstractworker.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":146,"kind":512,"name":"constructor","url":"classes/abstractworker.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"AbstractWorker"},{"id":147,"kind":1024,"name":"maxInactiveTime","url":"classes/abstractworker.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":148,"kind":1024,"name":"killBehavior","url":"classes/abstractworker.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":149,"kind":1024,"name":"async","url":"classes/abstractworker.html#async","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":150,"kind":1024,"name":"lastTask","url":"classes/abstractworker.html#lasttask","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":151,"kind":1024,"name":"interval","url":"classes/abstractworker.html#interval","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":152,"kind":1024,"name":"mainWorker","url":"classes/abstractworker.html#mainworker","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":153,"kind":1024,"name":"opts","url":"classes/abstractworker.html#opts","classes":"tsd-kind-property tsd-parent-kind-class","parent":"AbstractWorker"},{"id":154,"kind":2048,"name":"checkFunctionInput","url":"classes/abstractworker.html#checkfunctioninput","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"AbstractWorker"},{"id":155,"kind":2048,"name":"getMainWorker","url":"classes/abstractworker.html#getmainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":156,"kind":2048,"name":"sendToMainWorker","url":"classes/abstractworker.html#sendtomainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":157,"kind":2048,"name":"checkAlive","url":"classes/abstractworker.html#checkalive","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":158,"kind":2048,"name":"handleError","url":"classes/abstractworker.html#handleerror","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":159,"kind":2048,"name":"run","url":"classes/abstractworker.html#run","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":160,"kind":2048,"name":"runAsync","url":"classes/abstractworker.html#runasync","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":161,"kind":128,"name":"ClusterWorker","url":"classes/clusterworker.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":162,"kind":512,"name":"constructor","url":"classes/clusterworker.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"ClusterWorker"},{"id":163,"kind":2048,"name":"sendToMainWorker","url":"classes/clusterworker.html#sendtomainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected","parent":"ClusterWorker"},{"id":164,"kind":2048,"name":"handleError","url":"classes/clusterworker.html#handleerror","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected","parent":"ClusterWorker"},{"id":165,"kind":1024,"name":"maxInactiveTime","url":"classes/clusterworker.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":166,"kind":1024,"name":"killBehavior","url":"classes/clusterworker.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":167,"kind":1024,"name":"async","url":"classes/clusterworker.html#async","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":168,"kind":1024,"name":"lastTask","url":"classes/clusterworker.html#lasttask","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":169,"kind":1024,"name":"interval","url":"classes/clusterworker.html#interval","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":170,"kind":1024,"name":"mainWorker","url":"classes/clusterworker.html#mainworker","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":171,"kind":1024,"name":"opts","url":"classes/clusterworker.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ClusterWorker"},{"id":172,"kind":2048,"name":"getMainWorker","url":"classes/clusterworker.html#getmainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":173,"kind":2048,"name":"checkAlive","url":"classes/clusterworker.html#checkalive","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":174,"kind":2048,"name":"run","url":"classes/clusterworker.html#run","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":175,"kind":2048,"name":"runAsync","url":"classes/clusterworker.html#runasync","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":176,"kind":128,"name":"ThreadWorker","url":"classes/threadworker.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":177,"kind":512,"name":"constructor","url":"classes/threadworker.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"ThreadWorker"},{"id":178,"kind":2048,"name":"sendToMainWorker","url":"classes/threadworker.html#sendtomainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected","parent":"ThreadWorker"},{"id":179,"kind":1024,"name":"maxInactiveTime","url":"classes/threadworker.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":180,"kind":1024,"name":"killBehavior","url":"classes/threadworker.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":181,"kind":1024,"name":"async","url":"classes/threadworker.html#async","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":182,"kind":1024,"name":"lastTask","url":"classes/threadworker.html#lasttask","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":183,"kind":1024,"name":"interval","url":"classes/threadworker.html#interval","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":184,"kind":1024,"name":"mainWorker","url":"classes/threadworker.html#mainworker","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":185,"kind":1024,"name":"opts","url":"classes/threadworker.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ThreadWorker"},{"id":186,"kind":2048,"name":"getMainWorker","url":"classes/threadworker.html#getmainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":187,"kind":2048,"name":"checkAlive","url":"classes/threadworker.html#checkalive","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":188,"kind":2048,"name":"handleError","url":"classes/threadworker.html#handleerror","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":189,"kind":2048,"name":"run","url":"classes/threadworker.html#run","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":190,"kind":2048,"name":"runAsync","url":"classes/threadworker.html#runasync","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":191,"kind":32,"name":"KillBehaviors","url":"index.html#killbehaviors","classes":"tsd-kind-variable"},{"id":192,"kind":4194304,"name":"KillBehavior","url":"index.html#killbehavior","classes":"tsd-kind-type-alias"},{"id":193,"kind":256,"name":"WorkerOptions","url":"interfaces/workeroptions.html","classes":"tsd-kind-interface"},{"id":194,"kind":1024,"name":"maxInactiveTime","url":"interfaces/workeroptions.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WorkerOptions"},{"id":195,"kind":1024,"name":"async","url":"interfaces/workeroptions.html#async","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WorkerOptions"},{"id":196,"kind":1024,"name":"killBehavior","url":"interfaces/workeroptions.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WorkerOptions"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,37.842]],["parent/0",[]],["name/1",[1,40.355]],["parent/1",[0,3.617]],["name/2",[2,37.842]],["parent/2",[]],["name/3",[1,40.355]],["parent/3",[2,3.617]],["name/4",[3,40.355]],["parent/4",[]],["name/5",[4,48.828]],["parent/5",[3,3.857]],["name/6",[5,48.828]],["parent/6",[3,3.857]],["name/7",[6,37.842]],["parent/7",[]],["name/8",[1,40.355]],["parent/8",[6,3.617]],["name/9",[7,35.835]],["parent/9",[]],["name/10",[0,37.842]],["parent/10",[7,3.425]],["name/11",[6,37.842]],["parent/11",[7,3.425]],["name/12",[2,37.842]],["parent/12",[7,3.425]],["name/13",[8,40.355]],["parent/13",[7,3.425]],["name/14",[9,18.705]],["parent/14",[]],["name/15",[10,32.734]],["parent/15",[9,1.788]],["name/16",[11,43.72]],["parent/16",[9,1.788]],["name/17",[12,37.842]],["parent/17",[9,1.788]],["name/18",[13,32.734]],["parent/18",[9,1.788]],["name/19",[14,37.842]],["parent/19",[9,1.788]],["name/20",[15,37.842]],["parent/20",[9,1.788]],["name/21",[16,37.842]],["parent/21",[9,1.788]],["name/22",[17,37.842]],["parent/22",[9,1.788]],["name/23",[18,37.842]],["parent/23",[9,1.788]],["name/24",[19,37.842]],["parent/24",[9,1.788]],["name/25",[20,37.842]],["parent/25",[9,1.788]],["name/26",[21,37.842]],["parent/26",[9,1.788]],["name/27",[22,37.842]],["parent/27",[9,1.788]],["name/28",[23,37.842]],["parent/28",[9,1.788]],["name/29",[24,37.842]],["parent/29",[9,1.788]],["name/30",[25,37.842]],["parent/30",[9,1.788]],["name/31",[26,37.842]],["parent/31",[9,1.788]],["name/32",[27,37.842]],["parent/32",[9,1.788]],["name/33",[28,37.842]],["parent/33",[9,1.788]],["name/34",[29,35.835]],["parent/34",[9,1.788]],["name/35",[30,35.835]],["parent/35",[9,1.788]],["name/36",[31,35.835]],["parent/36",[9,1.788]],["name/37",[32,37.842]],["parent/37",[9,1.788]],["name/38",[33,37.842]],["parent/38",[9,1.788]],["name/39",[34,37.842]],["parent/39",[9,1.788]],["name/40",[35,37.842]],["parent/40",[9,1.788]],["name/41",[36,37.842]],["parent/41",[9,1.788]],["name/42",[37,37.842]],["parent/42",[9,1.788]],["name/43",[38,37.842]],["parent/43",[9,1.788]],["name/44",[39,19.039]],["parent/44",[]],["name/45",[10,32.734]],["parent/45",[39,1.82]],["name/46",[13,32.734]],["parent/46",[39,1.82]],["name/47",[14,37.842]],["parent/47",[39,1.82]],["name/48",[15,37.842]],["parent/48",[39,1.82]],["name/49",[16,37.842]],["parent/49",[39,1.82]],["name/50",[17,37.842]],["parent/50",[39,1.82]],["name/51",[18,37.842]],["parent/51",[39,1.82]],["name/52",[19,37.842]],["parent/52",[39,1.82]],["name/53",[20,37.842]],["parent/53",[39,1.82]],["name/54",[21,37.842]],["parent/54",[39,1.82]],["name/55",[22,37.842]],["parent/55",[39,1.82]],["name/56",[23,37.842]],["parent/56",[39,1.82]],["name/57",[24,37.842]],["parent/57",[39,1.82]],["name/58",[25,37.842]],["parent/58",[39,1.82]],["name/59",[26,37.842]],["parent/59",[39,1.82]],["name/60",[27,37.842]],["parent/60",[39,1.82]],["name/61",[28,37.842]],["parent/61",[39,1.82]],["name/62",[12,37.842]],["parent/62",[39,1.82]],["name/63",[29,35.835]],["parent/63",[39,1.82]],["name/64",[30,35.835]],["parent/64",[39,1.82]],["name/65",[31,35.835]],["parent/65",[39,1.82]],["name/66",[32,37.842]],["parent/66",[39,1.82]],["name/67",[33,37.842]],["parent/67",[39,1.82]],["name/68",[34,37.842]],["parent/68",[39,1.82]],["name/69",[35,37.842]],["parent/69",[39,1.82]],["name/70",[36,37.842]],["parent/70",[39,1.82]],["name/71",[37,37.842]],["parent/71",[39,1.82]],["name/72",[38,37.842]],["parent/72",[39,1.82]],["name/73",[40,34.165]],["parent/73",[]],["name/74",[41,48.828]],["parent/74",[40,3.266]],["name/75",[0,37.842]],["parent/75",[40,3.266]],["name/76",[6,37.842]],["parent/76",[40,3.266]],["name/77",[2,37.842]],["parent/77",[40,3.266]],["name/78",[8,40.355]],["parent/78",[40,3.266]],["name/79",[42,37.842]],["parent/79",[]],["name/80",[30,35.835]],["parent/80",[42,3.617]],["name/81",[31,35.835]],["parent/81",[42,3.617]],["name/82",[29,35.835]],["parent/82",[42,3.617]],["name/83",[43,48.828]],["parent/83",[]],["name/84",[8,40.355]],["parent/84",[]],["name/85",[44,18.705]],["parent/85",[]],["name/86",[10,32.734]],["parent/86",[44,1.788]],["name/87",[11,43.72]],["parent/87",[44,1.788]],["name/88",[12,37.842]],["parent/88",[44,1.788]],["name/89",[15,37.842]],["parent/89",[44,1.788]],["name/90",[16,37.842]],["parent/90",[44,1.788]],["name/91",[17,37.842]],["parent/91",[44,1.788]],["name/92",[18,37.842]],["parent/92",[44,1.788]],["name/93",[19,37.842]],["parent/93",[44,1.788]],["name/94",[20,37.842]],["parent/94",[44,1.788]],["name/95",[21,37.842]],["parent/95",[44,1.788]],["name/96",[22,37.842]],["parent/96",[44,1.788]],["name/97",[23,37.842]],["parent/97",[44,1.788]],["name/98",[24,37.842]],["parent/98",[44,1.788]],["name/99",[25,37.842]],["parent/99",[44,1.788]],["name/100",[26,37.842]],["parent/100",[44,1.788]],["name/101",[27,37.842]],["parent/101",[44,1.788]],["name/102",[28,37.842]],["parent/102",[44,1.788]],["name/103",[13,32.734]],["parent/103",[44,1.788]],["name/104",[29,35.835]],["parent/104",[44,1.788]],["name/105",[30,35.835]],["parent/105",[44,1.788]],["name/106",[31,35.835]],["parent/106",[44,1.788]],["name/107",[14,37.842]],["parent/107",[44,1.788]],["name/108",[32,37.842]],["parent/108",[44,1.788]],["name/109",[33,37.842]],["parent/109",[44,1.788]],["name/110",[34,37.842]],["parent/110",[44,1.788]],["name/111",[35,37.842]],["parent/111",[44,1.788]],["name/112",[36,37.842]],["parent/112",[44,1.788]],["name/113",[37,37.842]],["parent/113",[44,1.788]],["name/114",[38,37.842]],["parent/114",[44,1.788]],["name/115",[45,19.039]],["parent/115",[]],["name/116",[10,32.734]],["parent/116",[45,1.82]],["name/117",[15,37.842]],["parent/117",[45,1.82]],["name/118",[16,37.842]],["parent/118",[45,1.82]],["name/119",[17,37.842]],["parent/119",[45,1.82]],["name/120",[18,37.842]],["parent/120",[45,1.82]],["name/121",[19,37.842]],["parent/121",[45,1.82]],["name/122",[20,37.842]],["parent/122",[45,1.82]],["name/123",[21,37.842]],["parent/123",[45,1.82]],["name/124",[22,37.842]],["parent/124",[45,1.82]],["name/125",[23,37.842]],["parent/125",[45,1.82]],["name/126",[24,37.842]],["parent/126",[45,1.82]],["name/127",[25,37.842]],["parent/127",[45,1.82]],["name/128",[26,37.842]],["parent/128",[45,1.82]],["name/129",[27,37.842]],["parent/129",[45,1.82]],["name/130",[28,37.842]],["parent/130",[45,1.82]],["name/131",[13,32.734]],["parent/131",[45,1.82]],["name/132",[12,37.842]],["parent/132",[45,1.82]],["name/133",[29,35.835]],["parent/133",[45,1.82]],["name/134",[30,35.835]],["parent/134",[45,1.82]],["name/135",[31,35.835]],["parent/135",[45,1.82]],["name/136",[14,37.842]],["parent/136",[45,1.82]],["name/137",[32,37.842]],["parent/137",[45,1.82]],["name/138",[33,37.842]],["parent/138",[45,1.82]],["name/139",[34,37.842]],["parent/139",[45,1.82]],["name/140",[35,37.842]],["parent/140",[45,1.82]],["name/141",[36,37.842]],["parent/141",[45,1.82]],["name/142",[37,37.842]],["parent/142",[45,1.82]],["name/143",[38,37.842]],["parent/143",[45,1.82]],["name/144",[46,48.828]],["parent/144",[]],["name/145",[47,24.849]],["parent/145",[]],["name/146",[10,32.734]],["parent/146",[47,2.375]],["name/147",[48,37.842]],["parent/147",[47,2.375]],["name/148",[49,35.835]],["parent/148",[47,2.375]],["name/149",[50,37.842]],["parent/149",[47,2.375]],["name/150",[51,40.355]],["parent/150",[47,2.375]],["name/151",[52,40.355]],["parent/151",[47,2.375]],["name/152",[53,40.355]],["parent/152",[47,2.375]],["name/153",[13,32.734]],["parent/153",[47,2.375]],["name/154",[54,48.828]],["parent/154",[47,2.375]],["name/155",[55,40.355]],["parent/155",[47,2.375]],["name/156",[56,40.355]],["parent/156",[47,2.375]],["name/157",[57,40.355]],["parent/157",[47,2.375]],["name/158",[58,40.355]],["parent/158",[47,2.375]],["name/159",[59,40.355]],["parent/159",[47,2.375]],["name/160",[60,40.355]],["parent/160",[47,2.375]],["name/161",[61,25.474]],["parent/161",[]],["name/162",[10,32.734]],["parent/162",[61,2.435]],["name/163",[56,40.355]],["parent/163",[61,2.435]],["name/164",[58,40.355]],["parent/164",[61,2.435]],["name/165",[48,37.842]],["parent/165",[61,2.435]],["name/166",[49,35.835]],["parent/166",[61,2.435]],["name/167",[50,37.842]],["parent/167",[61,2.435]],["name/168",[51,40.355]],["parent/168",[61,2.435]],["name/169",[52,40.355]],["parent/169",[61,2.435]],["name/170",[53,40.355]],["parent/170",[61,2.435]],["name/171",[13,32.734]],["parent/171",[61,2.435]],["name/172",[55,40.355]],["parent/172",[61,2.435]],["name/173",[57,40.355]],["parent/173",[61,2.435]],["name/174",[59,40.355]],["parent/174",[61,2.435]],["name/175",[60,40.355]],["parent/175",[61,2.435]],["name/176",[62,25.474]],["parent/176",[]],["name/177",[10,32.734]],["parent/177",[62,2.435]],["name/178",[56,40.355]],["parent/178",[62,2.435]],["name/179",[48,37.842]],["parent/179",[62,2.435]],["name/180",[49,35.835]],["parent/180",[62,2.435]],["name/181",[50,37.842]],["parent/181",[62,2.435]],["name/182",[51,40.355]],["parent/182",[62,2.435]],["name/183",[52,40.355]],["parent/183",[62,2.435]],["name/184",[53,40.355]],["parent/184",[62,2.435]],["name/185",[13,32.734]],["parent/185",[62,2.435]],["name/186",[55,40.355]],["parent/186",[62,2.435]],["name/187",[57,40.355]],["parent/187",[62,2.435]],["name/188",[58,40.355]],["parent/188",[62,2.435]],["name/189",[59,40.355]],["parent/189",[62,2.435]],["name/190",[60,40.355]],["parent/190",[62,2.435]],["name/191",[63,48.828]],["parent/191",[]],["name/192",[49,35.835]],["parent/192",[]],["name/193",[64,37.842]],["parent/193",[]],["name/194",[48,37.842]],["parent/194",[64,3.617]],["name/195",[50,37.842]],["parent/195",[64,3.617]],["name/196",[49,35.835]],["parent/196",[64,3.617]]],"invertedIndex":[["__type",{"_index":1,"name":{"1":{},"3":{},"8":{}},"parent":{}}],["abstractworker",{"_index":47,"name":{"145":{}},"parent":{"146":{},"147":{},"148":{},"149":{},"150":{},"151":{},"152":{},"153":{},"154":{},"155":{},"156":{},"157":{},"158":{},"159":{},"160":{}}}],["afterworkersetup",{"_index":20,"name":{"25":{},"53":{},"94":{},"122":{}},"parent":{}}],["async",{"_index":50,"name":{"149":{},"167":{},"181":{},"195":{}},"parent":{}}],["checkalive",{"_index":57,"name":{"157":{},"173":{},"187":{}},"parent":{}}],["checkfunctioninput",{"_index":54,"name":{"154":{}},"parent":{}}],["chooseworker",{"_index":35,"name":{"40":{},"69":{},"111":{},"140":{}},"parent":{}}],["clusterpooloptions",{"_index":40,"name":{"73":{}},"parent":{"74":{},"75":{},"76":{},"77":{},"78":{}}}],["clusterworker",{"_index":61,"name":{"161":{}},"parent":{"162":{},"163":{},"164":{},"165":{},"166":{},"167":{},"168":{},"169":{},"170":{},"171":{},"172":{},"173":{},"174":{},"175":{}}}],["constructor",{"_index":10,"name":{"15":{},"45":{},"86":{},"116":{},"146":{},"162":{},"177":{}},"parent":{}}],["createandsetupworker",{"_index":37,"name":{"42":{},"71":{},"113":{},"142":{}},"parent":{}}],["createworker",{"_index":19,"name":{"24":{},"52":{},"93":{},"121":{}},"parent":{}}],["decreaseworkerstasks",{"_index":33,"name":{"38":{},"67":{},"109":{},"138":{}},"parent":{}}],["destroy",{"_index":31,"name":{"36":{},"65":{},"81":{},"106":{},"135":{}},"parent":{}}],["destroyworker",{"_index":16,"name":{"21":{},"49":{},"90":{},"118":{}},"parent":{}}],["dynamic",{"_index":12,"name":{"17":{},"62":{},"88":{},"132":{}},"parent":{}}],["dynamicclusterpool",{"_index":9,"name":{"14":{}},"parent":{"15":{},"16":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{},"37":{},"38":{},"39":{},"40":{},"41":{},"42":{},"43":{}}}],["dynamicthreadpool",{"_index":44,"name":{"85":{}},"parent":{"86":{},"87":{},"88":{},"89":{},"90":{},"91":{},"92":{},"93":{},"94":{},"95":{},"96":{},"97":{},"98":{},"99":{},"100":{},"101":{},"102":{},"103":{},"104":{},"105":{},"106":{},"107":{},"108":{},"109":{},"110":{},"111":{},"112":{},"113":{},"114":{}}}],["emitter",{"_index":23,"name":{"28":{},"56":{},"97":{},"125":{}},"parent":{}}],["env",{"_index":41,"name":{"74":{}},"parent":{}}],["errorhandler",{"_index":0,"name":{"0":{},"10":{},"75":{}},"parent":{"1":{}}}],["execute",{"_index":30,"name":{"35":{},"64":{},"80":{},"105":{},"134":{}},"parent":{}}],["exithandler",{"_index":2,"name":{"2":{},"12":{},"77":{}},"parent":{"3":{}}}],["filepath",{"_index":28,"name":{"33":{},"61":{},"102":{},"130":{}},"parent":{}}],["fixedclusterpool",{"_index":39,"name":{"44":{}},"parent":{"45":{},"46":{},"47":{},"48":{},"49":{},"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{},"60":{},"61":{},"62":{},"63":{},"64":{},"65":{},"66":{},"67":{},"68":{},"69":{},"70":{},"71":{},"72":{}}}],["fixedthreadpool",{"_index":45,"name":{"115":{}},"parent":{"116":{},"117":{},"118":{},"119":{},"120":{},"121":{},"122":{},"123":{},"124":{},"125":{},"126":{},"127":{},"128":{},"129":{},"130":{},"131":{},"132":{},"133":{},"134":{},"135":{},"136":{},"137":{},"138":{},"139":{},"140":{},"141":{},"142":{},"143":{}}}],["getmainworker",{"_index":55,"name":{"155":{},"172":{},"186":{}},"parent":{}}],["handleerror",{"_index":58,"name":{"158":{},"164":{},"188":{}},"parent":{}}],["increaseworkerstask",{"_index":32,"name":{"37":{},"66":{},"108":{},"137":{}},"parent":{}}],["internalexecute",{"_index":36,"name":{"41":{},"70":{},"112":{},"141":{}},"parent":{}}],["interval",{"_index":52,"name":{"151":{},"169":{},"183":{}},"parent":{}}],["ipool",{"_index":42,"name":{"79":{}},"parent":{"80":{},"81":{},"82":{}}}],["ismain",{"_index":15,"name":{"20":{},"48":{},"89":{},"117":{}},"parent":{}}],["iworker",{"_index":3,"name":{"4":{}},"parent":{"5":{},"6":{}}}],["killbehavior",{"_index":49,"name":{"148":{},"166":{},"180":{},"192":{},"196":{}},"parent":{}}],["killbehaviors",{"_index":63,"name":{"191":{}},"parent":{}}],["lasttask",{"_index":51,"name":{"150":{},"168":{},"182":{}},"parent":{}}],["mainworker",{"_index":53,"name":{"152":{},"170":{},"184":{}},"parent":{}}],["max",{"_index":11,"name":{"16":{},"87":{}},"parent":{}}],["maxinactivetime",{"_index":48,"name":{"147":{},"165":{},"179":{},"194":{}},"parent":{}}],["nextmessageid",{"_index":25,"name":{"30":{},"58":{},"99":{},"127":{}},"parent":{}}],["numberofworkers",{"_index":27,"name":{"32":{},"60":{},"101":{},"129":{}},"parent":{}}],["on",{"_index":4,"name":{"5":{}},"parent":{}}],["once",{"_index":5,"name":{"6":{}},"parent":{}}],["onlinehandler",{"_index":6,"name":{"7":{},"11":{},"76":{}},"parent":{"8":{}}}],["opts",{"_index":13,"name":{"18":{},"46":{},"103":{},"131":{},"153":{},"171":{},"185":{}},"parent":{}}],["pooloptions",{"_index":7,"name":{"9":{}},"parent":{"10":{},"11":{},"12":{},"13":{}}}],["promisemap",{"_index":24,"name":{"29":{},"57":{},"98":{},"126":{}},"parent":{}}],["registerworkermessagelistener",{"_index":18,"name":{"23":{},"51":{},"92":{},"120":{}},"parent":{}}],["removeworker",{"_index":34,"name":{"39":{},"68":{},"110":{},"139":{}},"parent":{}}],["run",{"_index":59,"name":{"159":{},"174":{},"189":{}},"parent":{}}],["runasync",{"_index":60,"name":{"160":{},"175":{},"190":{}},"parent":{}}],["sendtomainworker",{"_index":56,"name":{"156":{},"163":{},"178":{}},"parent":{}}],["sendtoworker",{"_index":17,"name":{"22":{},"50":{},"91":{},"119":{}},"parent":{}}],["setuphook",{"_index":14,"name":{"19":{},"47":{},"107":{},"136":{}},"parent":{}}],["setworkerchoicestrategy",{"_index":29,"name":{"34":{},"63":{},"82":{},"104":{},"133":{}},"parent":{}}],["tasks",{"_index":22,"name":{"27":{},"55":{},"96":{},"124":{}},"parent":{}}],["threadworker",{"_index":62,"name":{"176":{}},"parent":{"177":{},"178":{},"179":{},"180":{},"181":{},"182":{},"183":{},"184":{},"185":{},"186":{},"187":{},"188":{},"189":{},"190":{}}}],["threadworkerwithmessagechannel",{"_index":46,"name":{"144":{}},"parent":{}}],["workerchoicestrategies",{"_index":43,"name":{"83":{}},"parent":{}}],["workerchoicestrategy",{"_index":8,"name":{"13":{},"78":{},"84":{}},"parent":{}}],["workerchoicestrategycontext",{"_index":26,"name":{"31":{},"59":{},"100":{},"128":{}},"parent":{}}],["workerlistener",{"_index":38,"name":{"43":{},"72":{},"114":{},"143":{}},"parent":{}}],["workeroptions",{"_index":64,"name":{"193":{}},"parent":{"194":{},"195":{},"196":{}}}],["workers",{"_index":21,"name":{"26":{},"54":{},"95":{},"123":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file +window.searchData = {"kinds":{"32":"Variable","128":"Class","256":"Interface","512":"Constructor","1024":"Property","2048":"Method","65536":"Type literal","262144":"Accessor","4194304":"Type alias"},"rows":[{"id":0,"kind":4194304,"name":"ErrorHandler","url":"index.html#errorhandler","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":1,"kind":65536,"name":"__type","url":"index.html#errorhandler.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"ErrorHandler"},{"id":2,"kind":4194304,"name":"ExitHandler","url":"index.html#exithandler","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":3,"kind":65536,"name":"__type","url":"index.html#exithandler.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"ExitHandler"},{"id":4,"kind":256,"name":"IWorker","url":"interfaces/iworker.html","classes":"tsd-kind-interface"},{"id":5,"kind":2048,"name":"on","url":"interfaces/iworker.html#on","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IWorker"},{"id":6,"kind":2048,"name":"once","url":"interfaces/iworker.html#once","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IWorker"},{"id":7,"kind":4194304,"name":"OnlineHandler","url":"index.html#onlinehandler","classes":"tsd-kind-type-alias tsd-has-type-parameter"},{"id":8,"kind":65536,"name":"__type","url":"index.html#onlinehandler.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"OnlineHandler"},{"id":9,"kind":256,"name":"PoolOptions","url":"interfaces/pooloptions.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":10,"kind":1024,"name":"errorHandler","url":"interfaces/pooloptions.html#errorhandler","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":11,"kind":1024,"name":"onlineHandler","url":"interfaces/pooloptions.html#onlinehandler","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":12,"kind":1024,"name":"exitHandler","url":"interfaces/pooloptions.html#exithandler","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":13,"kind":1024,"name":"workerChoiceStrategy","url":"interfaces/pooloptions.html#workerchoicestrategy","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":14,"kind":1024,"name":"enableEvents","url":"interfaces/pooloptions.html#enableevents","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PoolOptions"},{"id":15,"kind":128,"name":"DynamicClusterPool","url":"classes/dynamicclusterpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":16,"kind":512,"name":"constructor","url":"classes/dynamicclusterpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicClusterPool"},{"id":17,"kind":1024,"name":"max","url":"classes/dynamicclusterpool.html#max","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":18,"kind":262144,"name":"type","url":"classes/dynamicclusterpool.html#type","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":19,"kind":262144,"name":"busy","url":"classes/dynamicclusterpool.html#busy","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":20,"kind":1024,"name":"opts","url":"classes/dynamicclusterpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":21,"kind":2048,"name":"setupHook","url":"classes/dynamicclusterpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":22,"kind":2048,"name":"isMain","url":"classes/dynamicclusterpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":23,"kind":2048,"name":"destroyWorker","url":"classes/dynamicclusterpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":24,"kind":2048,"name":"sendToWorker","url":"classes/dynamicclusterpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":25,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/dynamicclusterpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicClusterPool"},{"id":26,"kind":2048,"name":"createWorker","url":"classes/dynamicclusterpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":27,"kind":2048,"name":"afterWorkerSetup","url":"classes/dynamicclusterpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":28,"kind":1024,"name":"workers","url":"classes/dynamicclusterpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":29,"kind":1024,"name":"tasks","url":"classes/dynamicclusterpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":30,"kind":1024,"name":"emitter","url":"classes/dynamicclusterpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":31,"kind":1024,"name":"promiseMap","url":"classes/dynamicclusterpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":32,"kind":1024,"name":"nextMessageId","url":"classes/dynamicclusterpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":33,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/dynamicclusterpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":34,"kind":1024,"name":"numberOfWorkers","url":"classes/dynamicclusterpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":35,"kind":1024,"name":"filePath","url":"classes/dynamicclusterpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":36,"kind":262144,"name":"numberOfRunningTasks","url":"classes/dynamicclusterpool.html#numberofrunningtasks","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":37,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/dynamicclusterpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":38,"kind":2048,"name":"internalGetBusyStatus","url":"classes/dynamicclusterpool.html#internalgetbusystatus","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":39,"kind":2048,"name":"findFreeTasksMapEntry","url":"classes/dynamicclusterpool.html#findfreetasksmapentry","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":40,"kind":2048,"name":"execute","url":"classes/dynamicclusterpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":41,"kind":2048,"name":"destroy","url":"classes/dynamicclusterpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicClusterPool"},{"id":42,"kind":2048,"name":"increaseWorkersTask","url":"classes/dynamicclusterpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":43,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/dynamicclusterpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":44,"kind":2048,"name":"removeWorker","url":"classes/dynamicclusterpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":45,"kind":2048,"name":"chooseWorker","url":"classes/dynamicclusterpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":46,"kind":2048,"name":"internalExecute","url":"classes/dynamicclusterpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":47,"kind":2048,"name":"createAndSetupWorker","url":"classes/dynamicclusterpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":48,"kind":2048,"name":"workerListener","url":"classes/dynamicclusterpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicClusterPool"},{"id":49,"kind":128,"name":"FixedClusterPool","url":"classes/fixedclusterpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":50,"kind":512,"name":"constructor","url":"classes/fixedclusterpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedClusterPool"},{"id":51,"kind":1024,"name":"opts","url":"classes/fixedclusterpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":52,"kind":2048,"name":"setupHook","url":"classes/fixedclusterpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":53,"kind":2048,"name":"isMain","url":"classes/fixedclusterpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":54,"kind":2048,"name":"destroyWorker","url":"classes/fixedclusterpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":55,"kind":2048,"name":"sendToWorker","url":"classes/fixedclusterpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":56,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/fixedclusterpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedClusterPool"},{"id":57,"kind":2048,"name":"createWorker","url":"classes/fixedclusterpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":58,"kind":2048,"name":"afterWorkerSetup","url":"classes/fixedclusterpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":59,"kind":262144,"name":"type","url":"classes/fixedclusterpool.html#type","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":60,"kind":262144,"name":"busy","url":"classes/fixedclusterpool.html#busy","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":61,"kind":1024,"name":"workers","url":"classes/fixedclusterpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":62,"kind":1024,"name":"tasks","url":"classes/fixedclusterpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":63,"kind":1024,"name":"emitter","url":"classes/fixedclusterpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":64,"kind":1024,"name":"max","url":"classes/fixedclusterpool.html#max","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":65,"kind":1024,"name":"promiseMap","url":"classes/fixedclusterpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":66,"kind":1024,"name":"nextMessageId","url":"classes/fixedclusterpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":67,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/fixedclusterpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":68,"kind":1024,"name":"numberOfWorkers","url":"classes/fixedclusterpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":69,"kind":1024,"name":"filePath","url":"classes/fixedclusterpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":70,"kind":262144,"name":"numberOfRunningTasks","url":"classes/fixedclusterpool.html#numberofrunningtasks","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":71,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/fixedclusterpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":72,"kind":2048,"name":"internalGetBusyStatus","url":"classes/fixedclusterpool.html#internalgetbusystatus","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":73,"kind":2048,"name":"findFreeTasksMapEntry","url":"classes/fixedclusterpool.html#findfreetasksmapentry","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":74,"kind":2048,"name":"execute","url":"classes/fixedclusterpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":75,"kind":2048,"name":"destroy","url":"classes/fixedclusterpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedClusterPool"},{"id":76,"kind":2048,"name":"increaseWorkersTask","url":"classes/fixedclusterpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":77,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/fixedclusterpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":78,"kind":2048,"name":"removeWorker","url":"classes/fixedclusterpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":79,"kind":2048,"name":"chooseWorker","url":"classes/fixedclusterpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":80,"kind":2048,"name":"internalExecute","url":"classes/fixedclusterpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":81,"kind":2048,"name":"createAndSetupWorker","url":"classes/fixedclusterpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":82,"kind":2048,"name":"workerListener","url":"classes/fixedclusterpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedClusterPool"},{"id":83,"kind":256,"name":"ClusterPoolOptions","url":"interfaces/clusterpooloptions.html","classes":"tsd-kind-interface"},{"id":84,"kind":1024,"name":"env","url":"interfaces/clusterpooloptions.html#env","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ClusterPoolOptions"},{"id":85,"kind":1024,"name":"errorHandler","url":"interfaces/clusterpooloptions.html#errorhandler","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":86,"kind":1024,"name":"onlineHandler","url":"interfaces/clusterpooloptions.html#onlinehandler","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":87,"kind":1024,"name":"exitHandler","url":"interfaces/clusterpooloptions.html#exithandler","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":88,"kind":1024,"name":"workerChoiceStrategy","url":"interfaces/clusterpooloptions.html#workerchoicestrategy","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":89,"kind":1024,"name":"enableEvents","url":"interfaces/clusterpooloptions.html#enableevents","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ClusterPoolOptions"},{"id":90,"kind":256,"name":"IPool","url":"interfaces/ipool.html","classes":"tsd-kind-interface tsd-has-type-parameter"},{"id":91,"kind":2048,"name":"execute","url":"interfaces/ipool.html#execute","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IPool"},{"id":92,"kind":2048,"name":"destroy","url":"interfaces/ipool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IPool"},{"id":93,"kind":2048,"name":"setWorkerChoiceStrategy","url":"interfaces/ipool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"IPool"},{"id":94,"kind":32,"name":"WorkerChoiceStrategies","url":"index.html#workerchoicestrategies","classes":"tsd-kind-variable"},{"id":95,"kind":4194304,"name":"WorkerChoiceStrategy","url":"index.html#workerchoicestrategy","classes":"tsd-kind-type-alias"},{"id":96,"kind":128,"name":"DynamicThreadPool","url":"classes/dynamicthreadpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":97,"kind":512,"name":"constructor","url":"classes/dynamicthreadpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicThreadPool"},{"id":98,"kind":1024,"name":"max","url":"classes/dynamicthreadpool.html#max","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":99,"kind":262144,"name":"type","url":"classes/dynamicthreadpool.html#type","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":100,"kind":262144,"name":"busy","url":"classes/dynamicthreadpool.html#busy","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":101,"kind":2048,"name":"isMain","url":"classes/dynamicthreadpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":102,"kind":2048,"name":"destroyWorker","url":"classes/dynamicthreadpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":103,"kind":2048,"name":"sendToWorker","url":"classes/dynamicthreadpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":104,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/dynamicthreadpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"DynamicThreadPool"},{"id":105,"kind":2048,"name":"createWorker","url":"classes/dynamicthreadpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":106,"kind":2048,"name":"afterWorkerSetup","url":"classes/dynamicthreadpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":107,"kind":1024,"name":"workers","url":"classes/dynamicthreadpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":108,"kind":1024,"name":"tasks","url":"classes/dynamicthreadpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":109,"kind":1024,"name":"emitter","url":"classes/dynamicthreadpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":110,"kind":1024,"name":"promiseMap","url":"classes/dynamicthreadpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":111,"kind":1024,"name":"nextMessageId","url":"classes/dynamicthreadpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":112,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/dynamicthreadpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":113,"kind":1024,"name":"numberOfWorkers","url":"classes/dynamicthreadpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":114,"kind":1024,"name":"filePath","url":"classes/dynamicthreadpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":115,"kind":1024,"name":"opts","url":"classes/dynamicthreadpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":116,"kind":262144,"name":"numberOfRunningTasks","url":"classes/dynamicthreadpool.html#numberofrunningtasks","classes":"tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":117,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/dynamicthreadpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":118,"kind":2048,"name":"internalGetBusyStatus","url":"classes/dynamicthreadpool.html#internalgetbusystatus","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":119,"kind":2048,"name":"findFreeTasksMapEntry","url":"classes/dynamicthreadpool.html#findfreetasksmapentry","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":120,"kind":2048,"name":"execute","url":"classes/dynamicthreadpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":121,"kind":2048,"name":"destroy","url":"classes/dynamicthreadpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited","parent":"DynamicThreadPool"},{"id":122,"kind":2048,"name":"setupHook","url":"classes/dynamicthreadpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":123,"kind":2048,"name":"increaseWorkersTask","url":"classes/dynamicthreadpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":124,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/dynamicthreadpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":125,"kind":2048,"name":"removeWorker","url":"classes/dynamicthreadpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":126,"kind":2048,"name":"chooseWorker","url":"classes/dynamicthreadpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":127,"kind":2048,"name":"internalExecute","url":"classes/dynamicthreadpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":128,"kind":2048,"name":"createAndSetupWorker","url":"classes/dynamicthreadpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":129,"kind":2048,"name":"workerListener","url":"classes/dynamicthreadpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"DynamicThreadPool"},{"id":130,"kind":128,"name":"FixedThreadPool","url":"classes/fixedthreadpool.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":131,"kind":512,"name":"constructor","url":"classes/fixedthreadpool.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedThreadPool"},{"id":132,"kind":2048,"name":"isMain","url":"classes/fixedthreadpool.html#ismain","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":133,"kind":2048,"name":"destroyWorker","url":"classes/fixedthreadpool.html#destroyworker","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":134,"kind":2048,"name":"sendToWorker","url":"classes/fixedthreadpool.html#sendtoworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":135,"kind":2048,"name":"registerWorkerMessageListener","url":"classes/fixedthreadpool.html#registerworkermessagelistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter","parent":"FixedThreadPool"},{"id":136,"kind":2048,"name":"createWorker","url":"classes/fixedthreadpool.html#createworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":137,"kind":2048,"name":"afterWorkerSetup","url":"classes/fixedthreadpool.html#afterworkersetup","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":138,"kind":262144,"name":"type","url":"classes/fixedthreadpool.html#type","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":139,"kind":262144,"name":"busy","url":"classes/fixedthreadpool.html#busy","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":140,"kind":1024,"name":"workers","url":"classes/fixedthreadpool.html#workers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":141,"kind":1024,"name":"tasks","url":"classes/fixedthreadpool.html#tasks","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":142,"kind":1024,"name":"emitter","url":"classes/fixedthreadpool.html#emitter","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":143,"kind":1024,"name":"max","url":"classes/fixedthreadpool.html#max","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":144,"kind":1024,"name":"promiseMap","url":"classes/fixedthreadpool.html#promisemap","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":145,"kind":1024,"name":"nextMessageId","url":"classes/fixedthreadpool.html#nextmessageid","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":146,"kind":1024,"name":"workerChoiceStrategyContext","url":"classes/fixedthreadpool.html#workerchoicestrategycontext","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":147,"kind":1024,"name":"numberOfWorkers","url":"classes/fixedthreadpool.html#numberofworkers","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":148,"kind":1024,"name":"filePath","url":"classes/fixedthreadpool.html#filepath","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":149,"kind":1024,"name":"opts","url":"classes/fixedthreadpool.html#opts","classes":"tsd-kind-property tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":150,"kind":262144,"name":"numberOfRunningTasks","url":"classes/fixedthreadpool.html#numberofrunningtasks","classes":"tsd-kind-get-signature tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":151,"kind":2048,"name":"setWorkerChoiceStrategy","url":"classes/fixedthreadpool.html#setworkerchoicestrategy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":152,"kind":2048,"name":"internalGetBusyStatus","url":"classes/fixedthreadpool.html#internalgetbusystatus","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":153,"kind":2048,"name":"findFreeTasksMapEntry","url":"classes/fixedthreadpool.html#findfreetasksmapentry","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":154,"kind":2048,"name":"execute","url":"classes/fixedthreadpool.html#execute","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":155,"kind":2048,"name":"destroy","url":"classes/fixedthreadpool.html#destroy","classes":"tsd-kind-method tsd-parent-kind-class","parent":"FixedThreadPool"},{"id":156,"kind":2048,"name":"setupHook","url":"classes/fixedthreadpool.html#setuphook","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":157,"kind":2048,"name":"increaseWorkersTask","url":"classes/fixedthreadpool.html#increaseworkerstask","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":158,"kind":2048,"name":"decreaseWorkersTasks","url":"classes/fixedthreadpool.html#decreaseworkerstasks","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":159,"kind":2048,"name":"removeWorker","url":"classes/fixedthreadpool.html#removeworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":160,"kind":2048,"name":"chooseWorker","url":"classes/fixedthreadpool.html#chooseworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":161,"kind":2048,"name":"internalExecute","url":"classes/fixedthreadpool.html#internalexecute","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":162,"kind":2048,"name":"createAndSetupWorker","url":"classes/fixedthreadpool.html#createandsetupworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":163,"kind":2048,"name":"workerListener","url":"classes/fixedthreadpool.html#workerlistener","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"FixedThreadPool"},{"id":164,"kind":4194304,"name":"ThreadWorkerWithMessageChannel","url":"index.html#threadworkerwithmessagechannel","classes":"tsd-kind-type-alias"},{"id":165,"kind":128,"name":"AbstractWorker","url":"classes/abstractworker.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":166,"kind":512,"name":"constructor","url":"classes/abstractworker.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter","parent":"AbstractWorker"},{"id":167,"kind":1024,"name":"maxInactiveTime","url":"classes/abstractworker.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":168,"kind":1024,"name":"killBehavior","url":"classes/abstractworker.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":169,"kind":1024,"name":"async","url":"classes/abstractworker.html#async","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":170,"kind":1024,"name":"lastTask","url":"classes/abstractworker.html#lasttask","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":171,"kind":1024,"name":"interval","url":"classes/abstractworker.html#interval","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":172,"kind":1024,"name":"mainWorker","url":"classes/abstractworker.html#mainworker","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":173,"kind":1024,"name":"opts","url":"classes/abstractworker.html#opts","classes":"tsd-kind-property tsd-parent-kind-class","parent":"AbstractWorker"},{"id":174,"kind":2048,"name":"checkFunctionInput","url":"classes/abstractworker.html#checkfunctioninput","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-private","parent":"AbstractWorker"},{"id":175,"kind":2048,"name":"getMainWorker","url":"classes/abstractworker.html#getmainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":176,"kind":2048,"name":"sendToMainWorker","url":"classes/abstractworker.html#sendtomainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":177,"kind":2048,"name":"checkAlive","url":"classes/abstractworker.html#checkalive","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":178,"kind":2048,"name":"handleError","url":"classes/abstractworker.html#handleerror","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":179,"kind":2048,"name":"run","url":"classes/abstractworker.html#run","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":180,"kind":2048,"name":"runAsync","url":"classes/abstractworker.html#runasync","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-protected","parent":"AbstractWorker"},{"id":181,"kind":128,"name":"ClusterWorker","url":"classes/clusterworker.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":182,"kind":512,"name":"constructor","url":"classes/clusterworker.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"ClusterWorker"},{"id":183,"kind":2048,"name":"sendToMainWorker","url":"classes/clusterworker.html#sendtomainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected","parent":"ClusterWorker"},{"id":184,"kind":2048,"name":"handleError","url":"classes/clusterworker.html#handleerror","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected","parent":"ClusterWorker"},{"id":185,"kind":1024,"name":"maxInactiveTime","url":"classes/clusterworker.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":186,"kind":1024,"name":"killBehavior","url":"classes/clusterworker.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":187,"kind":1024,"name":"async","url":"classes/clusterworker.html#async","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":188,"kind":1024,"name":"lastTask","url":"classes/clusterworker.html#lasttask","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":189,"kind":1024,"name":"interval","url":"classes/clusterworker.html#interval","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":190,"kind":1024,"name":"mainWorker","url":"classes/clusterworker.html#mainworker","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":191,"kind":1024,"name":"opts","url":"classes/clusterworker.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ClusterWorker"},{"id":192,"kind":2048,"name":"getMainWorker","url":"classes/clusterworker.html#getmainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":193,"kind":2048,"name":"checkAlive","url":"classes/clusterworker.html#checkalive","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":194,"kind":2048,"name":"run","url":"classes/clusterworker.html#run","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":195,"kind":2048,"name":"runAsync","url":"classes/clusterworker.html#runasync","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ClusterWorker"},{"id":196,"kind":128,"name":"ThreadWorker","url":"classes/threadworker.html","classes":"tsd-kind-class tsd-has-type-parameter"},{"id":197,"kind":512,"name":"constructor","url":"classes/threadworker.html#constructor","classes":"tsd-kind-constructor tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited","parent":"ThreadWorker"},{"id":198,"kind":2048,"name":"sendToMainWorker","url":"classes/threadworker.html#sendtomainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-protected","parent":"ThreadWorker"},{"id":199,"kind":1024,"name":"maxInactiveTime","url":"classes/threadworker.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":200,"kind":1024,"name":"killBehavior","url":"classes/threadworker.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":201,"kind":1024,"name":"async","url":"classes/threadworker.html#async","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":202,"kind":1024,"name":"lastTask","url":"classes/threadworker.html#lasttask","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":203,"kind":1024,"name":"interval","url":"classes/threadworker.html#interval","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":204,"kind":1024,"name":"mainWorker","url":"classes/threadworker.html#mainworker","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":205,"kind":1024,"name":"opts","url":"classes/threadworker.html#opts","classes":"tsd-kind-property tsd-parent-kind-class tsd-is-inherited","parent":"ThreadWorker"},{"id":206,"kind":2048,"name":"getMainWorker","url":"classes/threadworker.html#getmainworker","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":207,"kind":2048,"name":"checkAlive","url":"classes/threadworker.html#checkalive","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":208,"kind":2048,"name":"handleError","url":"classes/threadworker.html#handleerror","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":209,"kind":2048,"name":"run","url":"classes/threadworker.html#run","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":210,"kind":2048,"name":"runAsync","url":"classes/threadworker.html#runasync","classes":"tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-protected","parent":"ThreadWorker"},{"id":211,"kind":32,"name":"KillBehaviors","url":"index.html#killbehaviors","classes":"tsd-kind-variable"},{"id":212,"kind":4194304,"name":"KillBehavior","url":"index.html#killbehavior","classes":"tsd-kind-type-alias"},{"id":213,"kind":256,"name":"WorkerOptions","url":"interfaces/workeroptions.html","classes":"tsd-kind-interface"},{"id":214,"kind":1024,"name":"maxInactiveTime","url":"interfaces/workeroptions.html#maxinactivetime","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WorkerOptions"},{"id":215,"kind":1024,"name":"async","url":"interfaces/workeroptions.html#async","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WorkerOptions"},{"id":216,"kind":1024,"name":"killBehavior","url":"interfaces/workeroptions.html#killbehavior","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"WorkerOptions"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,38.804]],["parent/0",[]],["name/1",[1,41.317]],["parent/1",[0,3.726]],["name/2",[2,38.804]],["parent/2",[]],["name/3",[1,41.317]],["parent/3",[2,3.726]],["name/4",[3,41.317]],["parent/4",[]],["name/5",[4,49.79]],["parent/5",[3,3.967]],["name/6",[5,49.79]],["parent/6",[3,3.967]],["name/7",[6,38.804]],["parent/7",[]],["name/8",[1,41.317]],["parent/8",[6,3.726]],["name/9",[7,35.127]],["parent/9",[]],["name/10",[0,38.804]],["parent/10",[7,3.373]],["name/11",[6,38.804]],["parent/11",[7,3.373]],["name/12",[2,38.804]],["parent/12",[7,3.373]],["name/13",[8,41.317]],["parent/13",[7,3.373]],["name/14",[9,44.682]],["parent/14",[7,3.373]],["name/15",[10,18.435]],["parent/15",[]],["name/16",[11,33.696]],["parent/16",[10,1.77]],["name/17",[12,38.804]],["parent/17",[10,1.77]],["name/18",[13,38.804]],["parent/18",[10,1.77]],["name/19",[14,38.804]],["parent/19",[10,1.77]],["name/20",[15,33.696]],["parent/20",[10,1.77]],["name/21",[16,38.804]],["parent/21",[10,1.77]],["name/22",[17,38.804]],["parent/22",[10,1.77]],["name/23",[18,38.804]],["parent/23",[10,1.77]],["name/24",[19,38.804]],["parent/24",[10,1.77]],["name/25",[20,38.804]],["parent/25",[10,1.77]],["name/26",[21,38.804]],["parent/26",[10,1.77]],["name/27",[22,38.804]],["parent/27",[10,1.77]],["name/28",[23,38.804]],["parent/28",[10,1.77]],["name/29",[24,38.804]],["parent/29",[10,1.77]],["name/30",[25,38.804]],["parent/30",[10,1.77]],["name/31",[26,38.804]],["parent/31",[10,1.77]],["name/32",[27,38.804]],["parent/32",[10,1.77]],["name/33",[28,38.804]],["parent/33",[10,1.77]],["name/34",[29,38.804]],["parent/34",[10,1.77]],["name/35",[30,38.804]],["parent/35",[10,1.77]],["name/36",[31,38.804]],["parent/36",[10,1.77]],["name/37",[32,36.797]],["parent/37",[10,1.77]],["name/38",[33,38.804]],["parent/38",[10,1.77]],["name/39",[34,38.804]],["parent/39",[10,1.77]],["name/40",[35,36.797]],["parent/40",[10,1.77]],["name/41",[36,36.797]],["parent/41",[10,1.77]],["name/42",[37,38.804]],["parent/42",[10,1.77]],["name/43",[38,38.804]],["parent/43",[10,1.77]],["name/44",[39,38.804]],["parent/44",[10,1.77]],["name/45",[40,38.804]],["parent/45",[10,1.77]],["name/46",[41,38.804]],["parent/46",[10,1.77]],["name/47",[42,38.804]],["parent/47",[10,1.77]],["name/48",[43,38.804]],["parent/48",[10,1.77]],["name/49",[44,18.435]],["parent/49",[]],["name/50",[11,33.696]],["parent/50",[44,1.77]],["name/51",[15,33.696]],["parent/51",[44,1.77]],["name/52",[16,38.804]],["parent/52",[44,1.77]],["name/53",[17,38.804]],["parent/53",[44,1.77]],["name/54",[18,38.804]],["parent/54",[44,1.77]],["name/55",[19,38.804]],["parent/55",[44,1.77]],["name/56",[20,38.804]],["parent/56",[44,1.77]],["name/57",[21,38.804]],["parent/57",[44,1.77]],["name/58",[22,38.804]],["parent/58",[44,1.77]],["name/59",[13,38.804]],["parent/59",[44,1.77]],["name/60",[14,38.804]],["parent/60",[44,1.77]],["name/61",[23,38.804]],["parent/61",[44,1.77]],["name/62",[24,38.804]],["parent/62",[44,1.77]],["name/63",[25,38.804]],["parent/63",[44,1.77]],["name/64",[12,38.804]],["parent/64",[44,1.77]],["name/65",[26,38.804]],["parent/65",[44,1.77]],["name/66",[27,38.804]],["parent/66",[44,1.77]],["name/67",[28,38.804]],["parent/67",[44,1.77]],["name/68",[29,38.804]],["parent/68",[44,1.77]],["name/69",[30,38.804]],["parent/69",[44,1.77]],["name/70",[31,38.804]],["parent/70",[44,1.77]],["name/71",[32,36.797]],["parent/71",[44,1.77]],["name/72",[33,38.804]],["parent/72",[44,1.77]],["name/73",[34,38.804]],["parent/73",[44,1.77]],["name/74",[35,36.797]],["parent/74",[44,1.77]],["name/75",[36,36.797]],["parent/75",[44,1.77]],["name/76",[37,38.804]],["parent/76",[44,1.77]],["name/77",[38,38.804]],["parent/77",[44,1.77]],["name/78",[39,38.804]],["parent/78",[44,1.77]],["name/79",[40,38.804]],["parent/79",[44,1.77]],["name/80",[41,38.804]],["parent/80",[44,1.77]],["name/81",[42,38.804]],["parent/81",[44,1.77]],["name/82",[43,38.804]],["parent/82",[44,1.77]],["name/83",[45,33.696]],["parent/83",[]],["name/84",[46,49.79]],["parent/84",[45,3.235]],["name/85",[0,38.804]],["parent/85",[45,3.235]],["name/86",[6,38.804]],["parent/86",[45,3.235]],["name/87",[2,38.804]],["parent/87",[45,3.235]],["name/88",[8,41.317]],["parent/88",[45,3.235]],["name/89",[9,44.682]],["parent/89",[45,3.235]],["name/90",[47,38.804]],["parent/90",[]],["name/91",[35,36.797]],["parent/91",[47,3.726]],["name/92",[36,36.797]],["parent/92",[47,3.726]],["name/93",[32,36.797]],["parent/93",[47,3.726]],["name/94",[48,49.79]],["parent/94",[]],["name/95",[8,41.317]],["parent/95",[]],["name/96",[49,18.435]],["parent/96",[]],["name/97",[11,33.696]],["parent/97",[49,1.77]],["name/98",[12,38.804]],["parent/98",[49,1.77]],["name/99",[13,38.804]],["parent/99",[49,1.77]],["name/100",[14,38.804]],["parent/100",[49,1.77]],["name/101",[17,38.804]],["parent/101",[49,1.77]],["name/102",[18,38.804]],["parent/102",[49,1.77]],["name/103",[19,38.804]],["parent/103",[49,1.77]],["name/104",[20,38.804]],["parent/104",[49,1.77]],["name/105",[21,38.804]],["parent/105",[49,1.77]],["name/106",[22,38.804]],["parent/106",[49,1.77]],["name/107",[23,38.804]],["parent/107",[49,1.77]],["name/108",[24,38.804]],["parent/108",[49,1.77]],["name/109",[25,38.804]],["parent/109",[49,1.77]],["name/110",[26,38.804]],["parent/110",[49,1.77]],["name/111",[27,38.804]],["parent/111",[49,1.77]],["name/112",[28,38.804]],["parent/112",[49,1.77]],["name/113",[29,38.804]],["parent/113",[49,1.77]],["name/114",[30,38.804]],["parent/114",[49,1.77]],["name/115",[15,33.696]],["parent/115",[49,1.77]],["name/116",[31,38.804]],["parent/116",[49,1.77]],["name/117",[32,36.797]],["parent/117",[49,1.77]],["name/118",[33,38.804]],["parent/118",[49,1.77]],["name/119",[34,38.804]],["parent/119",[49,1.77]],["name/120",[35,36.797]],["parent/120",[49,1.77]],["name/121",[36,36.797]],["parent/121",[49,1.77]],["name/122",[16,38.804]],["parent/122",[49,1.77]],["name/123",[37,38.804]],["parent/123",[49,1.77]],["name/124",[38,38.804]],["parent/124",[49,1.77]],["name/125",[39,38.804]],["parent/125",[49,1.77]],["name/126",[40,38.804]],["parent/126",[49,1.77]],["name/127",[41,38.804]],["parent/127",[49,1.77]],["name/128",[42,38.804]],["parent/128",[49,1.77]],["name/129",[43,38.804]],["parent/129",[49,1.77]],["name/130",[50,18.435]],["parent/130",[]],["name/131",[11,33.696]],["parent/131",[50,1.77]],["name/132",[17,38.804]],["parent/132",[50,1.77]],["name/133",[18,38.804]],["parent/133",[50,1.77]],["name/134",[19,38.804]],["parent/134",[50,1.77]],["name/135",[20,38.804]],["parent/135",[50,1.77]],["name/136",[21,38.804]],["parent/136",[50,1.77]],["name/137",[22,38.804]],["parent/137",[50,1.77]],["name/138",[13,38.804]],["parent/138",[50,1.77]],["name/139",[14,38.804]],["parent/139",[50,1.77]],["name/140",[23,38.804]],["parent/140",[50,1.77]],["name/141",[24,38.804]],["parent/141",[50,1.77]],["name/142",[25,38.804]],["parent/142",[50,1.77]],["name/143",[12,38.804]],["parent/143",[50,1.77]],["name/144",[26,38.804]],["parent/144",[50,1.77]],["name/145",[27,38.804]],["parent/145",[50,1.77]],["name/146",[28,38.804]],["parent/146",[50,1.77]],["name/147",[29,38.804]],["parent/147",[50,1.77]],["name/148",[30,38.804]],["parent/148",[50,1.77]],["name/149",[15,33.696]],["parent/149",[50,1.77]],["name/150",[31,38.804]],["parent/150",[50,1.77]],["name/151",[32,36.797]],["parent/151",[50,1.77]],["name/152",[33,38.804]],["parent/152",[50,1.77]],["name/153",[34,38.804]],["parent/153",[50,1.77]],["name/154",[35,36.797]],["parent/154",[50,1.77]],["name/155",[36,36.797]],["parent/155",[50,1.77]],["name/156",[16,38.804]],["parent/156",[50,1.77]],["name/157",[37,38.804]],["parent/157",[50,1.77]],["name/158",[38,38.804]],["parent/158",[50,1.77]],["name/159",[39,38.804]],["parent/159",[50,1.77]],["name/160",[40,38.804]],["parent/160",[50,1.77]],["name/161",[41,38.804]],["parent/161",[50,1.77]],["name/162",[42,38.804]],["parent/162",[50,1.77]],["name/163",[43,38.804]],["parent/163",[50,1.77]],["name/164",[51,49.79]],["parent/164",[]],["name/165",[52,25.811]],["parent/165",[]],["name/166",[11,33.696]],["parent/166",[52,2.478]],["name/167",[53,38.804]],["parent/167",[52,2.478]],["name/168",[54,36.797]],["parent/168",[52,2.478]],["name/169",[55,38.804]],["parent/169",[52,2.478]],["name/170",[56,41.317]],["parent/170",[52,2.478]],["name/171",[57,41.317]],["parent/171",[52,2.478]],["name/172",[58,41.317]],["parent/172",[52,2.478]],["name/173",[15,33.696]],["parent/173",[52,2.478]],["name/174",[59,49.79]],["parent/174",[52,2.478]],["name/175",[60,41.317]],["parent/175",[52,2.478]],["name/176",[61,41.317]],["parent/176",[52,2.478]],["name/177",[62,41.317]],["parent/177",[52,2.478]],["name/178",[63,41.317]],["parent/178",[52,2.478]],["name/179",[64,41.317]],["parent/179",[52,2.478]],["name/180",[65,41.317]],["parent/180",[52,2.478]],["name/181",[66,26.437]],["parent/181",[]],["name/182",[11,33.696]],["parent/182",[66,2.538]],["name/183",[61,41.317]],["parent/183",[66,2.538]],["name/184",[63,41.317]],["parent/184",[66,2.538]],["name/185",[53,38.804]],["parent/185",[66,2.538]],["name/186",[54,36.797]],["parent/186",[66,2.538]],["name/187",[55,38.804]],["parent/187",[66,2.538]],["name/188",[56,41.317]],["parent/188",[66,2.538]],["name/189",[57,41.317]],["parent/189",[66,2.538]],["name/190",[58,41.317]],["parent/190",[66,2.538]],["name/191",[15,33.696]],["parent/191",[66,2.538]],["name/192",[60,41.317]],["parent/192",[66,2.538]],["name/193",[62,41.317]],["parent/193",[66,2.538]],["name/194",[64,41.317]],["parent/194",[66,2.538]],["name/195",[65,41.317]],["parent/195",[66,2.538]],["name/196",[67,26.437]],["parent/196",[]],["name/197",[11,33.696]],["parent/197",[67,2.538]],["name/198",[61,41.317]],["parent/198",[67,2.538]],["name/199",[53,38.804]],["parent/199",[67,2.538]],["name/200",[54,36.797]],["parent/200",[67,2.538]],["name/201",[55,38.804]],["parent/201",[67,2.538]],["name/202",[56,41.317]],["parent/202",[67,2.538]],["name/203",[57,41.317]],["parent/203",[67,2.538]],["name/204",[58,41.317]],["parent/204",[67,2.538]],["name/205",[15,33.696]],["parent/205",[67,2.538]],["name/206",[60,41.317]],["parent/206",[67,2.538]],["name/207",[62,41.317]],["parent/207",[67,2.538]],["name/208",[63,41.317]],["parent/208",[67,2.538]],["name/209",[64,41.317]],["parent/209",[67,2.538]],["name/210",[65,41.317]],["parent/210",[67,2.538]],["name/211",[68,49.79]],["parent/211",[]],["name/212",[54,36.797]],["parent/212",[]],["name/213",[69,38.804]],["parent/213",[]],["name/214",[53,38.804]],["parent/214",[69,3.726]],["name/215",[55,38.804]],["parent/215",[69,3.726]],["name/216",[54,36.797]],["parent/216",[69,3.726]]],"invertedIndex":[["__type",{"_index":1,"name":{"1":{},"3":{},"8":{}},"parent":{}}],["abstractworker",{"_index":52,"name":{"165":{}},"parent":{"166":{},"167":{},"168":{},"169":{},"170":{},"171":{},"172":{},"173":{},"174":{},"175":{},"176":{},"177":{},"178":{},"179":{},"180":{}}}],["afterworkersetup",{"_index":22,"name":{"27":{},"58":{},"106":{},"137":{}},"parent":{}}],["async",{"_index":55,"name":{"169":{},"187":{},"201":{},"215":{}},"parent":{}}],["busy",{"_index":14,"name":{"19":{},"60":{},"100":{},"139":{}},"parent":{}}],["checkalive",{"_index":62,"name":{"177":{},"193":{},"207":{}},"parent":{}}],["checkfunctioninput",{"_index":59,"name":{"174":{}},"parent":{}}],["chooseworker",{"_index":40,"name":{"45":{},"79":{},"126":{},"160":{}},"parent":{}}],["clusterpooloptions",{"_index":45,"name":{"83":{}},"parent":{"84":{},"85":{},"86":{},"87":{},"88":{},"89":{}}}],["clusterworker",{"_index":66,"name":{"181":{}},"parent":{"182":{},"183":{},"184":{},"185":{},"186":{},"187":{},"188":{},"189":{},"190":{},"191":{},"192":{},"193":{},"194":{},"195":{}}}],["constructor",{"_index":11,"name":{"16":{},"50":{},"97":{},"131":{},"166":{},"182":{},"197":{}},"parent":{}}],["createandsetupworker",{"_index":42,"name":{"47":{},"81":{},"128":{},"162":{}},"parent":{}}],["createworker",{"_index":21,"name":{"26":{},"57":{},"105":{},"136":{}},"parent":{}}],["decreaseworkerstasks",{"_index":38,"name":{"43":{},"77":{},"124":{},"158":{}},"parent":{}}],["destroy",{"_index":36,"name":{"41":{},"75":{},"92":{},"121":{},"155":{}},"parent":{}}],["destroyworker",{"_index":18,"name":{"23":{},"54":{},"102":{},"133":{}},"parent":{}}],["dynamicclusterpool",{"_index":10,"name":{"15":{}},"parent":{"16":{},"17":{},"18":{},"19":{},"20":{},"21":{},"22":{},"23":{},"24":{},"25":{},"26":{},"27":{},"28":{},"29":{},"30":{},"31":{},"32":{},"33":{},"34":{},"35":{},"36":{},"37":{},"38":{},"39":{},"40":{},"41":{},"42":{},"43":{},"44":{},"45":{},"46":{},"47":{},"48":{}}}],["dynamicthreadpool",{"_index":49,"name":{"96":{}},"parent":{"97":{},"98":{},"99":{},"100":{},"101":{},"102":{},"103":{},"104":{},"105":{},"106":{},"107":{},"108":{},"109":{},"110":{},"111":{},"112":{},"113":{},"114":{},"115":{},"116":{},"117":{},"118":{},"119":{},"120":{},"121":{},"122":{},"123":{},"124":{},"125":{},"126":{},"127":{},"128":{},"129":{}}}],["emitter",{"_index":25,"name":{"30":{},"63":{},"109":{},"142":{}},"parent":{}}],["enableevents",{"_index":9,"name":{"14":{},"89":{}},"parent":{}}],["env",{"_index":46,"name":{"84":{}},"parent":{}}],["errorhandler",{"_index":0,"name":{"0":{},"10":{},"85":{}},"parent":{"1":{}}}],["execute",{"_index":35,"name":{"40":{},"74":{},"91":{},"120":{},"154":{}},"parent":{}}],["exithandler",{"_index":2,"name":{"2":{},"12":{},"87":{}},"parent":{"3":{}}}],["filepath",{"_index":30,"name":{"35":{},"69":{},"114":{},"148":{}},"parent":{}}],["findfreetasksmapentry",{"_index":34,"name":{"39":{},"73":{},"119":{},"153":{}},"parent":{}}],["fixedclusterpool",{"_index":44,"name":{"49":{}},"parent":{"50":{},"51":{},"52":{},"53":{},"54":{},"55":{},"56":{},"57":{},"58":{},"59":{},"60":{},"61":{},"62":{},"63":{},"64":{},"65":{},"66":{},"67":{},"68":{},"69":{},"70":{},"71":{},"72":{},"73":{},"74":{},"75":{},"76":{},"77":{},"78":{},"79":{},"80":{},"81":{},"82":{}}}],["fixedthreadpool",{"_index":50,"name":{"130":{}},"parent":{"131":{},"132":{},"133":{},"134":{},"135":{},"136":{},"137":{},"138":{},"139":{},"140":{},"141":{},"142":{},"143":{},"144":{},"145":{},"146":{},"147":{},"148":{},"149":{},"150":{},"151":{},"152":{},"153":{},"154":{},"155":{},"156":{},"157":{},"158":{},"159":{},"160":{},"161":{},"162":{},"163":{}}}],["getmainworker",{"_index":60,"name":{"175":{},"192":{},"206":{}},"parent":{}}],["handleerror",{"_index":63,"name":{"178":{},"184":{},"208":{}},"parent":{}}],["increaseworkerstask",{"_index":37,"name":{"42":{},"76":{},"123":{},"157":{}},"parent":{}}],["internalexecute",{"_index":41,"name":{"46":{},"80":{},"127":{},"161":{}},"parent":{}}],["internalgetbusystatus",{"_index":33,"name":{"38":{},"72":{},"118":{},"152":{}},"parent":{}}],["interval",{"_index":57,"name":{"171":{},"189":{},"203":{}},"parent":{}}],["ipool",{"_index":47,"name":{"90":{}},"parent":{"91":{},"92":{},"93":{}}}],["ismain",{"_index":17,"name":{"22":{},"53":{},"101":{},"132":{}},"parent":{}}],["iworker",{"_index":3,"name":{"4":{}},"parent":{"5":{},"6":{}}}],["killbehavior",{"_index":54,"name":{"168":{},"186":{},"200":{},"212":{},"216":{}},"parent":{}}],["killbehaviors",{"_index":68,"name":{"211":{}},"parent":{}}],["lasttask",{"_index":56,"name":{"170":{},"188":{},"202":{}},"parent":{}}],["mainworker",{"_index":58,"name":{"172":{},"190":{},"204":{}},"parent":{}}],["max",{"_index":12,"name":{"17":{},"64":{},"98":{},"143":{}},"parent":{}}],["maxinactivetime",{"_index":53,"name":{"167":{},"185":{},"199":{},"214":{}},"parent":{}}],["nextmessageid",{"_index":27,"name":{"32":{},"66":{},"111":{},"145":{}},"parent":{}}],["numberofrunningtasks",{"_index":31,"name":{"36":{},"70":{},"116":{},"150":{}},"parent":{}}],["numberofworkers",{"_index":29,"name":{"34":{},"68":{},"113":{},"147":{}},"parent":{}}],["on",{"_index":4,"name":{"5":{}},"parent":{}}],["once",{"_index":5,"name":{"6":{}},"parent":{}}],["onlinehandler",{"_index":6,"name":{"7":{},"11":{},"86":{}},"parent":{"8":{}}}],["opts",{"_index":15,"name":{"20":{},"51":{},"115":{},"149":{},"173":{},"191":{},"205":{}},"parent":{}}],["pooloptions",{"_index":7,"name":{"9":{}},"parent":{"10":{},"11":{},"12":{},"13":{},"14":{}}}],["promisemap",{"_index":26,"name":{"31":{},"65":{},"110":{},"144":{}},"parent":{}}],["registerworkermessagelistener",{"_index":20,"name":{"25":{},"56":{},"104":{},"135":{}},"parent":{}}],["removeworker",{"_index":39,"name":{"44":{},"78":{},"125":{},"159":{}},"parent":{}}],["run",{"_index":64,"name":{"179":{},"194":{},"209":{}},"parent":{}}],["runasync",{"_index":65,"name":{"180":{},"195":{},"210":{}},"parent":{}}],["sendtomainworker",{"_index":61,"name":{"176":{},"183":{},"198":{}},"parent":{}}],["sendtoworker",{"_index":19,"name":{"24":{},"55":{},"103":{},"134":{}},"parent":{}}],["setuphook",{"_index":16,"name":{"21":{},"52":{},"122":{},"156":{}},"parent":{}}],["setworkerchoicestrategy",{"_index":32,"name":{"37":{},"71":{},"93":{},"117":{},"151":{}},"parent":{}}],["tasks",{"_index":24,"name":{"29":{},"62":{},"108":{},"141":{}},"parent":{}}],["threadworker",{"_index":67,"name":{"196":{}},"parent":{"197":{},"198":{},"199":{},"200":{},"201":{},"202":{},"203":{},"204":{},"205":{},"206":{},"207":{},"208":{},"209":{},"210":{}}}],["threadworkerwithmessagechannel",{"_index":51,"name":{"164":{}},"parent":{}}],["type",{"_index":13,"name":{"18":{},"59":{},"99":{},"138":{}},"parent":{}}],["workerchoicestrategies",{"_index":48,"name":{"94":{}},"parent":{}}],["workerchoicestrategy",{"_index":8,"name":{"13":{},"88":{},"95":{}},"parent":{}}],["workerchoicestrategycontext",{"_index":28,"name":{"33":{},"67":{},"112":{},"146":{}},"parent":{}}],["workerlistener",{"_index":43,"name":{"48":{},"82":{},"129":{},"163":{}},"parent":{}}],["workeroptions",{"_index":69,"name":{"213":{}},"parent":{"214":{},"215":{},"216":{}}}],["workers",{"_index":23,"name":{"28":{},"61":{},"107":{},"140":{}},"parent":{}}]],"pipeline":[]}} \ No newline at end of file diff --git a/docs/classes/abstractworker.html b/docs/classes/abstractworker.html index b3abfb8b..bc99b16e 100644 --- a/docs/classes/abstractworker.html +++ b/docs/classes/abstractworker.html @@ -177,7 +177,7 @@
  • @@ -261,7 +261,7 @@
    async: boolean
    @@ -276,7 +276,7 @@
    interval: undefined | Timeout
    @@ -291,7 +291,7 @@
    killBehavior: "SOFT" | "HARD"
    @@ -306,7 +306,7 @@
    lastTask: number
    @@ -328,7 +328,7 @@
    maxInactiveTime: number
    @@ -412,7 +412,7 @@
  • @@ -434,7 +434,7 @@
  • @@ -505,7 +505,7 @@
  • @@ -528,7 +528,7 @@
  • @@ -560,7 +560,7 @@
  • @@ -615,7 +615,7 @@
  • @@ -745,7 +745,7 @@
  • diff --git a/docs/classes/clusterworker.html b/docs/classes/clusterworker.html index ecb320ad..c70fa06a 100644 --- a/docs/classes/clusterworker.html +++ b/docs/classes/clusterworker.html @@ -173,7 +173,7 @@
    @@ -237,7 +237,7 @@
    @@ -253,7 +253,7 @@
    @@ -269,7 +269,7 @@
    @@ -285,7 +285,7 @@
    @@ -309,7 +309,7 @@
    @@ -397,7 +397,7 @@
    @@ -443,7 +443,7 @@
    @@ -467,7 +467,7 @@

    Parameters

    @@ -491,7 +491,7 @@
    @@ -547,7 +547,7 @@
    @@ -679,7 +679,7 @@

    Parameters

    diff --git a/docs/classes/dynamicclusterpool.html b/docs/classes/dynamicclusterpool.html index 9882ff61..b3d21778 100644 --- a/docs/classes/dynamicclusterpool.html +++ b/docs/classes/dynamicclusterpool.html @@ -131,7 +131,7 @@ +
    + +

    findFreeTasksMapEntry

    +
      +
    • findFreeTasksMapEntry(): false | [Worker, number]
    • +
    + +

    Protected increaseWorkersTask

    @@ -601,12 +676,12 @@
    -

    Increase the number of tasks that the given workers has done.

    +

    Increase the number of tasks that the given workers has applied.

    Parameters

    @@ -633,7 +708,7 @@

    Parameters

    @@ -649,6 +724,24 @@
  • +
    + +

    Protected internalGetBusyStatus

    +
      +
    • internalGetBusyStatus(): boolean
    • +
    + +

    Protected isMain

    @@ -660,7 +753,7 @@

    Returns boolean

    @@ -678,7 +771,7 @@
    @@ -735,7 +828,7 @@
    @@ -767,7 +860,7 @@

    Parameters

    @@ -794,7 +887,7 @@
    @@ -824,7 +917,7 @@

    Returns void

    @@ -842,7 +935,7 @@
    @@ -905,7 +998,7 @@
  • filePath
  • -
  • +
  • max
  • @@ -930,7 +1023,13 @@ workers
  • - dynamic + busy +
  • +
  • + numberOfRunningTasks +
  • +
  • + type
  • afterWorkerSetup @@ -956,12 +1055,18 @@
  • execute
  • +
  • + findFreeTasksMapEntry +
  • increaseWorkersTask
  • internalExecute
  • +
  • + internalGetBusyStatus +
  • isMain
  • diff --git a/docs/classes/dynamicthreadpool.html b/docs/classes/dynamicthreadpool.html index cd0754d9..b81badc4 100644 --- a/docs/classes/dynamicthreadpool.html +++ b/docs/classes/dynamicthreadpool.html @@ -131,7 +131,7 @@
    +
    + +

    findFreeTasksMapEntry

    + + +

    Protected increaseWorkersTask

    @@ -601,12 +676,12 @@
    -

    Increase the number of tasks that the given workers has done.

    +

    Increase the number of tasks that the given workers has applied.

    Parameters

    @@ -633,7 +708,7 @@

    Parameters

    @@ -649,6 +724,24 @@
    +
    + +

    Protected internalGetBusyStatus

    +
      +
    • internalGetBusyStatus(): boolean
    • +
    + +

    Protected isMain

    @@ -660,7 +753,7 @@

    Returns boolean

    @@ -678,7 +771,7 @@
    @@ -735,7 +828,7 @@
    @@ -767,7 +860,7 @@

    Parameters

    @@ -794,7 +887,7 @@
    @@ -824,7 +917,7 @@
    @@ -848,7 +941,7 @@
    @@ -914,7 +1007,7 @@
  • filePath
  • -
  • +
  • max
  • @@ -939,7 +1032,13 @@ workers
  • - dynamic + busy +
  • +
  • + numberOfRunningTasks +
  • +
  • + type
  • afterWorkerSetup @@ -965,12 +1064,18 @@
  • execute
  • +
  • + findFreeTasksMapEntry +
  • increaseWorkersTask
  • internalExecute
  • +
  • + internalGetBusyStatus +
  • isMain
  • diff --git a/docs/classes/fixedclusterpool.html b/docs/classes/fixedclusterpool.html index f224864d..27a6c746 100644 --- a/docs/classes/fixedclusterpool.html +++ b/docs/classes/fixedclusterpool.html @@ -136,6 +136,7 @@
    +
    + +

    findFreeTasksMapEntry

    +
      +
    • findFreeTasksMapEntry(): false | [Worker, number]
    • +
    + +

    Protected increaseWorkersTask

    @@ -591,12 +681,12 @@
  • -

    Increase the number of tasks that the given workers has done.

    +

    Increase the number of tasks that the given workers has applied.

    Parameters

    @@ -622,7 +712,7 @@
  • Parameters

    @@ -638,6 +728,23 @@
  • +
    + +

    Protected internalGetBusyStatus

    +
      +
    • internalGetBusyStatus(): boolean
    • +
    + +

    Protected isMain

    @@ -648,7 +755,7 @@
  • Returns boolean

    @@ -665,7 +772,7 @@
  • @@ -721,7 +828,7 @@
  • @@ -752,7 +859,7 @@
  • Parameters

    @@ -778,7 +885,7 @@
  • @@ -807,7 +914,7 @@
  • Returns void

    @@ -824,7 +931,7 @@
  • @@ -893,6 +1000,9 @@
  • filePath
  • +
  • + max +
  • nextMessageId
  • @@ -915,7 +1025,13 @@ workers
  • - dynamic + busy +
  • +
  • + numberOfRunningTasks +
  • +
  • + type
  • afterWorkerSetup @@ -941,12 +1057,18 @@
  • execute
  • +
  • + findFreeTasksMapEntry +
  • increaseWorkersTask
  • internalExecute
  • +
  • + internalGetBusyStatus +
  • isMain
  • diff --git a/docs/classes/fixedthreadpool.html b/docs/classes/fixedthreadpool.html index 1fa02969..65c94585 100644 --- a/docs/classes/fixedthreadpool.html +++ b/docs/classes/fixedthreadpool.html @@ -136,6 +136,7 @@
    +
    + +

    findFreeTasksMapEntry

    + + +

    Protected increaseWorkersTask

    @@ -591,12 +681,12 @@
  • -

    Increase the number of tasks that the given workers has done.

    +

    Increase the number of tasks that the given workers has applied.

    Parameters

    @@ -622,7 +712,7 @@
  • Parameters

    @@ -638,6 +728,23 @@
  • +
    + +

    Protected internalGetBusyStatus

    +
      +
    • internalGetBusyStatus(): boolean
    • +
    + +

    Protected isMain

    @@ -648,7 +755,7 @@
  • Returns boolean

    @@ -665,7 +772,7 @@
  • @@ -721,7 +828,7 @@
  • @@ -752,7 +859,7 @@
  • Parameters

    @@ -778,7 +885,7 @@
  • @@ -807,7 +914,7 @@
  • @@ -830,7 +937,7 @@
  • @@ -902,6 +1009,9 @@
  • filePath
  • +
  • + max +
  • nextMessageId
  • @@ -924,7 +1034,13 @@ workers
  • - dynamic + busy +
  • +
  • + numberOfRunningTasks +
  • +
  • + type
  • afterWorkerSetup @@ -950,12 +1066,18 @@
  • execute
  • +
  • + findFreeTasksMapEntry +
  • increaseWorkersTask
  • internalExecute
  • +
  • + internalGetBusyStatus +
  • isMain
  • diff --git a/docs/classes/threadworker.html b/docs/classes/threadworker.html index 9066930d..b28df056 100644 --- a/docs/classes/threadworker.html +++ b/docs/classes/threadworker.html @@ -173,7 +173,7 @@
    @@ -237,7 +237,7 @@
    @@ -253,7 +253,7 @@
    @@ -269,7 +269,7 @@
    @@ -285,7 +285,7 @@
    @@ -309,7 +309,7 @@
    @@ -397,7 +397,7 @@
    @@ -443,7 +443,7 @@
    @@ -467,7 +467,7 @@
    @@ -500,7 +500,7 @@
    @@ -556,7 +556,7 @@
    @@ -688,7 +688,7 @@

    Parameters

    diff --git a/docs/index.html b/docs/index.html index 3edacaa6..6154496e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -112,7 +112,7 @@
    ErrorHandler<Worker>: (this: Worker, e: Error) => void
    @@ -157,7 +157,7 @@
    ExitHandler<Worker>: (this: Worker, code: number) => void
    @@ -202,7 +202,7 @@
    KillBehavior: keyof typeof KillBehaviors
    @@ -217,7 +217,7 @@
    OnlineHandler<Worker>: (this: Worker) => void
    @@ -259,7 +259,7 @@
    ThreadWorkerWithMessageChannel: Worker & Draft<MessageChannel>
    @@ -274,7 +274,7 @@
    WorkerChoiceStrategy: keyof typeof WorkerChoiceStrategies
    @@ -292,7 +292,7 @@
    KillBehaviors: Readonly<{ HARD: "HARD"; SOFT: "SOFT" }> = ...
    @@ -307,7 +307,7 @@
    WorkerChoiceStrategies: Readonly<{ LESS_RECENTLY_USED: "LESS_RECENTLY_USED"; ROUND_ROBIN: "ROUND_ROBIN" }> = ...
    diff --git a/docs/interfaces/clusterpooloptions.html b/docs/interfaces/clusterpooloptions.html index ee04a019..2ec928b1 100644 --- a/docs/interfaces/clusterpooloptions.html +++ b/docs/interfaces/clusterpooloptions.html @@ -92,6 +92,7 @@

    Properties

    Properties

    +
    + +

    Optional enableEvents

    +
    enableEvents: undefined | boolean
    + +
    +
    +

    Pool events emission.

    +
    +

    Default to true.

    +
    +

    Optional env

    env: any
    @@ -131,7 +149,7 @@
    @@ -147,7 +165,7 @@
    @@ -163,7 +181,7 @@
    @@ -179,7 +197,7 @@
    @@ -226,6 +244,9 @@
  • ClusterPoolOptions
      +
    • + enableEvents +
    • env
    • diff --git a/docs/interfaces/ipool.html b/docs/interfaces/ipool.html index a2643a39..b0061b54 100644 --- a/docs/interfaces/ipool.html +++ b/docs/interfaces/ipool.html @@ -128,7 +128,7 @@
    • @@ -150,7 +150,7 @@
    • @@ -182,7 +182,7 @@
    • diff --git a/docs/interfaces/iworker.html b/docs/interfaces/iworker.html index c4233ce3..2514393d 100644 --- a/docs/interfaces/iworker.html +++ b/docs/interfaces/iworker.html @@ -108,7 +108,7 @@
    • @@ -136,7 +136,7 @@
    • @@ -164,7 +164,7 @@
    • @@ -201,7 +201,7 @@
    • diff --git a/docs/interfaces/pooloptions.html b/docs/interfaces/pooloptions.html index f7dc49ab..6db10692 100644 --- a/docs/interfaces/pooloptions.html +++ b/docs/interfaces/pooloptions.html @@ -100,6 +100,7 @@

      Properties

      Properties

      +
      + +

      Optional enableEvents

      +
      enableEvents: undefined | boolean
      + +
      +
      +

      Pool events emission.

      +
      +

      Default to true.

      +
      +

      Optional errorHandler

      errorHandler: undefined | ErrorHandler<Worker>
      @@ -132,7 +149,7 @@
      exitHandler: undefined | ExitHandler<Worker>
      @@ -147,7 +164,7 @@
      onlineHandler: undefined | OnlineHandler<Worker>
      @@ -162,7 +179,7 @@
      workerChoiceStrategy: undefined | "ROUND_ROBIN" | "LESS_RECENTLY_USED"
      @@ -218,6 +235,9 @@
    • PoolOptions
        +
      • + enableEvents +
      • errorHandler
      • diff --git a/docs/interfaces/workeroptions.html b/docs/interfaces/workeroptions.html index 49f7fc63..374d84cf 100644 --- a/docs/interfaces/workeroptions.html +++ b/docs/interfaces/workeroptions.html @@ -103,7 +103,7 @@
        async: undefined | boolean
        @@ -123,7 +123,7 @@
        killBehavior: undefined | "SOFT" | "HARD"
        @@ -148,7 +148,7 @@
        maxInactiveTime: undefined | number
        diff --git a/package.json b/package.json index 42bb89f8..4368e854 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "lib/index.js", "scripts": { "build": "rollup --config --environment BUILD:development", + "build:typedoc": "rollup --config --environment BUILD:development --environment DOCUMENTATION", "build:prod": "rollup --config", "benchmark": "npm run build && node -r source-map-support/register benchmarks/internal/bench.js", "benchmark:debug": "npm run build && node -r source-map-support/register --inspect benchmarks/internal/bench.js", diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 0c4b59c9..ff7413dd 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -4,7 +4,7 @@ import type { } from '../utility-types' import { isKillBehavior, KillBehaviors } from '../worker/worker-options' import type { IPoolInternal } from './pool-internal' -import { PoolEmitter } from './pool-internal' +import { PoolEmitter, PoolType } from './pool-internal' import type { WorkerChoiceStrategy } from './selection-strategies' import { WorkerChoiceStrategies, @@ -87,6 +87,12 @@ export interface PoolOptions { * The work choice strategy to use in this pool. */ workerChoiceStrategy?: WorkerChoiceStrategy + /** + * Pool events emission. + * + * Default to true. + */ + enableEvents?: boolean } /** @@ -108,7 +114,10 @@ export abstract class AbstractPool< public readonly tasks: Map = new Map() /** @inheritdoc */ - public readonly emitter: PoolEmitter + public readonly emitter?: PoolEmitter + + /** @inheritdoc */ + public readonly max?: number /** * The promise map. @@ -156,13 +165,16 @@ export abstract class AbstractPool< } this.checkNumberOfWorkers(this.numberOfWorkers) this.checkFilePath(this.filePath) + this.checkPoolOptions(this.opts) this.setupHook() for (let i = 1; i <= this.numberOfWorkers; i++) { this.createAndSetupWorker() } - this.emitter = new PoolEmitter() + if (this.opts.enableEvents) { + this.emitter = new PoolEmitter() + } this.workerChoiceStrategyContext = new WorkerChoiceStrategyContext( this, () => { @@ -202,14 +214,21 @@ export abstract class AbstractPool< throw new Error( 'Cannot instantiate a pool with a negative number of workers' ) - } else if (!this.dynamic && numberOfWorkers === 0) { + } else if (this.type === PoolType.FIXED && numberOfWorkers === 0) { throw new Error('Cannot instantiate a fixed pool with no worker') } } + private checkPoolOptions (opts: PoolOptions): void { + this.opts.enableEvents = opts.enableEvents ?? true + } + /** @inheritdoc */ - public get dynamic (): boolean { - return false + public abstract get type (): PoolType + + /** @inheritdoc */ + public get numberOfRunningTasks (): number { + return this.promiseMap.size } /** @inheritdoc */ @@ -222,11 +241,33 @@ export abstract class AbstractPool< ) } + /** @inheritdoc */ + public abstract get busy (): boolean + + protected internalGetBusyStatus (): boolean { + return ( + this.numberOfRunningTasks >= this.numberOfWorkers && + this.findFreeTasksMapEntry() === false + ) + } + + /** @inheritdoc */ + public findFreeTasksMapEntry (): [Worker, number] | false { + for (const [worker, numberOfTasks] of this.tasks) { + if (numberOfTasks === 0) { + // A worker is free, return the matching tasks map entry + return [worker, numberOfTasks] + } + } + return false + } + /** @inheritdoc */ public execute (data: Data): Promise { // Configure worker to handle message with the specified task const worker = this.chooseWorker() this.increaseWorkersTask(worker) + this.checkAndEmitBusy() const messageId = ++this.nextMessageId const res = this.internalExecute(worker, messageId) this.sendToWorker(worker, { data: data || ({} as Data), id: messageId }) @@ -259,7 +300,7 @@ export abstract class AbstractPool< protected abstract isMain (): boolean /** - * Increase the number of tasks that the given workers has done. + * Increase the number of tasks that the given workers has applied. * * @param worker Worker whose tasks are increased. */ @@ -268,7 +309,7 @@ export abstract class AbstractPool< } /** - * Decrease the number of tasks that the given workers has done. + * Decrease the number of tasks that the given workers has applied. * * @param worker Worker whose tasks are decreased. */ @@ -277,7 +318,7 @@ export abstract class AbstractPool< } /** - * Step the number of tasks that the given workers has done. + * Step the number of tasks that the given workers has applied. * * @param worker Worker whose tasks are set. * @param step Worker number of tasks step. @@ -399,4 +440,10 @@ export abstract class AbstractPool< } } } + + private checkAndEmitBusy (): void { + if (this.opts.enableEvents && this.busy) { + this.emitter?.emit('busy') + } + } } diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index f0c3c0e4..33497b03 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -1,3 +1,4 @@ +import { PoolType } from '../pool-internal' import type { ClusterPoolOptions } from './fixed' import { FixedClusterPool } from './fixed' @@ -35,7 +36,12 @@ export class DynamicClusterPool< } /** @inheritdoc */ - public get dynamic (): boolean { - return true + public get type (): PoolType { + return PoolType.DYNAMIC + } + + /** @inheritdoc */ + public get busy (): boolean { + return this.workers.length === this.max } } diff --git a/src/pools/cluster/fixed.ts b/src/pools/cluster/fixed.ts index f651d3ad..b522947f 100644 --- a/src/pools/cluster/fixed.ts +++ b/src/pools/cluster/fixed.ts @@ -2,6 +2,7 @@ import { fork, isMaster, setupMaster, Worker } from 'cluster' import type { MessageValue } from '../../utility-types' import type { PoolOptions } from '../abstract-pool' import { AbstractPool } from '../abstract-pool' +import { PoolType } from '../pool-internal' /** * Options for a poolifier cluster pool. @@ -84,4 +85,14 @@ export class FixedClusterPool< // Listen worker messages. this.registerWorkerMessageListener(worker, super.workerListener()) } + + /** @inheritdoc */ + public get type (): PoolType { + return PoolType.FIXED + } + + /** @inheritdoc */ + public get busy (): boolean { + return this.internalGetBusyStatus() + } } diff --git a/src/pools/pool-internal.ts b/src/pools/pool-internal.ts index 911e761d..dd71ae71 100644 --- a/src/pools/pool-internal.ts +++ b/src/pools/pool-internal.ts @@ -2,6 +2,14 @@ import EventEmitter from 'events' import type { IWorker } from './abstract-pool' import type { IPool } from './pool' +/** + * Pool types. + */ +export enum PoolType { + FIXED = 'fixed', + DYNAMIC = 'dynamic' +} + /** * Internal poolifier pool emitter. */ @@ -39,17 +47,40 @@ export interface IPoolInternal< * * - `'busy'` */ - readonly emitter: PoolEmitter + readonly emitter?: PoolEmitter /** - * Whether the pool is dynamic or not. + * Pool type. * - * If it is dynamic, it provides the `max` property. + * If it is `'dynamic'`, it provides the `max` property. */ - readonly dynamic: boolean + readonly type: PoolType /** * Maximum number of workers that can be created by this pool. */ readonly max?: number + + /** + * Whether the pool is busy or not. + * + * The pool busyness boolean status. + */ + readonly busy: boolean + + /** + * Number of tasks currently concurrently running. + */ + readonly numberOfRunningTasks: number + + /** + * Find a tasks map entry with a free worker based on the number of tasks the worker has applied. + * + * If an entry is found with a worker that has `0` tasks, it is detected as free. + * + * If no tasks map entry with a free worker was found, `false` will be returned. + * + * @returns A tasks map entry with a free worker if there was one, otherwise `false`. + */ + findFreeTasksMapEntry(): [Worker, number] | false } diff --git a/src/pools/selection-strategies.ts b/src/pools/selection-strategies.ts index 692ace93..034b1612 100644 --- a/src/pools/selection-strategies.ts +++ b/src/pools/selection-strategies.ts @@ -1,5 +1,6 @@ import type { IWorker } from './abstract-pool' import type { IPoolInternal } from './pool-internal' +import { PoolType } from './pool-internal' /** * Enumeration of worker choice strategies. @@ -89,7 +90,7 @@ class LessRecentlyUsedWorkerChoiceStrategy< /** @inheritdoc */ public choose (): Worker { - const isPoolDynamic = this.pool.dynamic + const isPoolDynamic = this.pool.type === PoolType.DYNAMIC let minNumberOfTasks = Infinity // A worker is always found because it picks the one with fewer tasks let lessRecentlyUsedWorker!: Worker @@ -97,8 +98,8 @@ class LessRecentlyUsedWorkerChoiceStrategy< if (!isPoolDynamic && numberOfTasks === 0) { return worker } else if (numberOfTasks < minNumberOfTasks) { - minNumberOfTasks = numberOfTasks lessRecentlyUsedWorker = worker + minNumberOfTasks = numberOfTasks } } return lessRecentlyUsedWorker @@ -121,7 +122,7 @@ class DynamicPoolWorkerChoiceStrategy * * @param pool The pool instance. * @param createDynamicallyWorkerCallback The worker creation callback for dynamic pool. - * @param workerChoiceStrategy The worker choice strategy when the pull is full. + * @param workerChoiceStrategy The worker choice strategy when the pull is busy. */ public constructor ( private readonly pool: IPoolInternal, @@ -136,15 +137,12 @@ class DynamicPoolWorkerChoiceStrategy /** @inheritdoc */ public choose (): Worker { - const freeWorker = SelectionStrategiesUtils.findFreeWorkerBasedOnTasks( - this.pool.tasks - ) - if (freeWorker) { - return freeWorker + const freeTaskMapEntry = this.pool.findFreeTasksMapEntry() + if (freeTaskMapEntry) { + return freeTaskMapEntry[0] } - if (this.pool.workers.length === this.pool.max) { - this.pool.emitter.emit('busy') + if (this.pool.busy) { return this.workerChoiceStrategy.choose() } @@ -192,7 +190,7 @@ export class WorkerChoiceStrategyContext< private getPoolWorkerChoiceStrategy ( workerChoiceStrategy: WorkerChoiceStrategy = WorkerChoiceStrategies.ROUND_ROBIN ): IWorkerChoiceStrategy { - if (this.pool.dynamic) { + if (this.pool.type === PoolType.DYNAMIC) { return new DynamicPoolWorkerChoiceStrategy( this.pool, this.createDynamicallyWorkerCallback, @@ -229,31 +227,9 @@ export class WorkerChoiceStrategyContext< } /** - * Worker selection strategies helpers. + * Worker selection strategies helpers class. */ class SelectionStrategiesUtils { - /** - * Find a free worker based on number of tasks the worker has applied. - * - * If a worker was found that has `0` tasks, it is detected as free and will be returned. - * - * If no free worker was found, `null` will be returned. - * - * @param workerTasksMap The pool worker tasks map. - * @returns A free worker if there was one, otherwise `null`. - */ - public static findFreeWorkerBasedOnTasks ( - workerTasksMap: Map - ): Worker | null { - for (const [worker, numberOfTasks] of workerTasksMap) { - if (numberOfTasks === 0) { - // A worker is free, use it - return worker - } - } - return null - } - /** * Get the worker choice strategy instance. * diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index b4fd46c1..16aeb439 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -1,4 +1,5 @@ import type { PoolOptions } from '../abstract-pool' +import { PoolType } from '../pool-internal' import type { ThreadWorkerWithMessageChannel } from './fixed' import { FixedThreadPool } from './fixed' @@ -36,7 +37,12 @@ export class DynamicThreadPool< } /** @inheritdoc */ - public get dynamic (): boolean { - return true + public get type (): PoolType { + return PoolType.DYNAMIC + } + + /** @inheritdoc */ + public get busy (): boolean { + return this.workers.length === this.max } } diff --git a/src/pools/thread/fixed.ts b/src/pools/thread/fixed.ts index 6fec9aa0..abd1b6b8 100644 --- a/src/pools/thread/fixed.ts +++ b/src/pools/thread/fixed.ts @@ -2,6 +2,7 @@ import { isMainThread, MessageChannel, SHARE_ENV, Worker } from 'worker_threads' import type { Draft, MessageValue } from '../../utility-types' import type { PoolOptions } from '../abstract-pool' import { AbstractPool } from '../abstract-pool' +import { PoolType } from '../pool-internal' /** * A thread worker with message channels for communication between main thread and thread worker. @@ -81,4 +82,14 @@ export class FixedThreadPool< // Listen worker messages. this.registerWorkerMessageListener(worker, super.workerListener()) } + + /** @inheritdoc */ + public get type (): PoolType { + return PoolType.FIXED + } + + /** @inheritdoc */ + public get busy (): boolean { + return this.internalGetBusyStatus() + } } diff --git a/tests/pools/abstract/abstract-pool.test.js b/tests/pools/abstract/abstract-pool.test.js index 5d6311b9..03a5db7e 100644 --- a/tests/pools/abstract/abstract-pool.test.js +++ b/tests/pools/abstract/abstract-pool.test.js @@ -2,6 +2,8 @@ const expect = require('expect') const { FixedClusterPool, FixedThreadPool } = require('../../../lib/index') const expectedError = new Error('Worker could not be found in tasks map') +const numberOfWorkers = 1 + class StubPoolWithTasksMapClear extends FixedThreadPool { removeAllWorker () { this.tasks.clear() @@ -17,17 +19,18 @@ class StubPoolWithIsMainMethod extends FixedThreadPool { describe('Abstract pool test suite', () => { it('Simulate worker not found during increaseWorkersTask', () => { const pool = new StubPoolWithTasksMapClear( - 1, + numberOfWorkers, './tests/worker-files/thread/testWorker.js' ) // Simulate worker not found. pool.removeAllWorker() expect(() => pool.increaseWorkersTask()).toThrowError(expectedError) + pool.destroy() }) it('Simulate worker not found during decreaseWorkersTasks', () => { const pool = new StubPoolWithTasksMapClear( - 1, + numberOfWorkers, './tests/worker-files/thread/testWorker.js', { errorHandler: e => console.error(e) @@ -36,13 +39,14 @@ describe('Abstract pool test suite', () => { // Simulate worker not found. pool.removeAllWorker() expect(() => pool.decreaseWorkersTasks()).toThrowError(expectedError) + pool.destroy() }) it('Simulate pool creation from a non main thread/process', () => { expect( () => new StubPoolWithIsMainMethod( - 1, + numberOfWorkers, './tests/worker-files/thread/testWorker.js', { errorHandler: e => console.error(e) @@ -52,11 +56,11 @@ describe('Abstract pool test suite', () => { }) it('Verify that filePath is checked', () => { - expect(() => new StubPoolWithIsMainMethod(1)).toThrowError( - new Error('Cannot start a pool from a worker!') + expect(() => new FixedThreadPool(numberOfWorkers)).toThrowError( + new Error('Please specify a file with a worker implementation') ) - expect(() => new StubPoolWithIsMainMethod(1, '')).toThrowError( - new Error('Cannot start a pool from a worker!') + expect(() => new FixedThreadPool(numberOfWorkers, '')).toThrowError( + new Error('Please specify a file with a worker implementation') ) }) @@ -87,4 +91,39 @@ describe('Abstract pool test suite', () => { ) ) }) + + it('Verify that pool options are checked', () => { + let pool = new FixedThreadPool( + numberOfWorkers, + './tests/worker-files/thread/testWorker.js' + ) + expect(pool.opts.enableEvents).toEqual(true) + expect(pool.emitter).toBeDefined() + pool.destroy() + pool = new FixedThreadPool( + numberOfWorkers, + './tests/worker-files/thread/testWorker.js', + { + enableEvents: false + } + ) + expect(pool.opts.enableEvents).toEqual(false) + expect(pool.emitter).toBeUndefined() + pool.destroy() + }) + + it("Verify that pool event emitter 'busy' event can register a callback", () => { + const pool = new FixedThreadPool( + numberOfWorkers, + './tests/worker-files/thread/testWorker.js' + ) + const promises = [] + let poolBusy = 0 + pool.emitter.on('busy', () => poolBusy++) + for (let i = 0; i < numberOfWorkers * 2; i++) { + promises.push(pool.execute({ test: 'test' })) + } + expect(poolBusy).toEqual(numberOfWorkers) + pool.destroy() + }) }) diff --git a/tests/pools/cluster/dynamic.test.js b/tests/pools/cluster/dynamic.test.js index 607e1fe9..54d53b11 100644 --- a/tests/pools/cluster/dynamic.test.js +++ b/tests/pools/cluster/dynamic.test.js @@ -21,14 +21,14 @@ describe('Dynamic cluster pool test suite', () => { it('Verify that new workers are created when required, max size is not exceeded and that after a while new workers will die', async () => { const promises = [] - let busy = 0 - pool.emitter.on('busy', () => busy++) + let poolBusy = 0 + pool.emitter.on('busy', () => poolBusy++) for (let i = 0; i < max * 2; i++) { promises.push(pool.execute({ test: 'test' })) } expect(pool.workers.length).toBeLessThanOrEqual(max) expect(pool.workers.length).toBeGreaterThan(min) - expect(busy > 1).toBeTruthy() + expect(poolBusy).toEqual(max + 1) const numberOfExitEvents = await TestUtils.waitExits(pool, max - min) expect(numberOfExitEvents).toBe(max - min) }) diff --git a/tests/pools/cluster/fixed.test.js b/tests/pools/cluster/fixed.test.js index a5eaa29a..c69b72d8 100644 --- a/tests/pools/cluster/fixed.test.js +++ b/tests/pools/cluster/fixed.test.js @@ -11,7 +11,8 @@ const pool = new FixedClusterPool( ) const emptyPool = new FixedClusterPool( 1, - './tests/worker-files/cluster/emptyWorker.js' + './tests/worker-files/cluster/emptyWorker.js', + { exitHandler: () => console.log('empty pool worker exited') } ) const echoPool = new FixedClusterPool( 1, @@ -66,6 +67,16 @@ describe('Fixed cluster pool test suite', () => { expect(result).toBeFalsy() }) + it('Verify that busy event is emitted', async () => { + const promises = [] + let poolBusy = 0 + pool.emitter.on('busy', () => poolBusy++) + for (let i = 0; i < numberOfWorkers * 2; i++) { + promises.push(pool.execute({ test: 'test' })) + } + expect(poolBusy).toEqual(numberOfWorkers) + }) + it('Verify that is possible to have a worker that return undefined', async () => { const result = await emptyPool.execute() expect(result).toBeFalsy() @@ -87,7 +98,7 @@ describe('Fixed cluster pool test suite', () => { inError = e } expect(inError).toBeDefined() - expect(typeof inError === 'string').toBeTruthy() + expect(typeof inError === 'string').toEqual(true) expect(inError).toBe('Error Message from ClusterWorker') }) @@ -100,7 +111,7 @@ describe('Fixed cluster pool test suite', () => { inError = e } expect(inError).toBeDefined() - expect(typeof inError === 'string').toBeTruthy() + expect(typeof inError === 'string').toEqual(true) expect(inError).toBe('Error Message from ClusterWorker:async') }) diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index 2e3a8492..4e7df229 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -21,13 +21,13 @@ describe('Dynamic thread pool test suite', () => { it('Verify that new workers are created when required, max size is not exceeded and that after a while new workers will die', async () => { const promises = [] - let busy = 0 - pool.emitter.on('busy', () => busy++) + let poolBusy = 0 + pool.emitter.on('busy', () => poolBusy++) for (let i = 0; i < max * 2; i++) { promises.push(pool.execute({ test: 'test' })) } expect(pool.workers.length).toBe(max) - expect(busy > 1).toBeTruthy() + expect(poolBusy).toEqual(max + 1) const res = await TestUtils.waitExits(pool, max - min) expect(res).toBe(max - min) }) diff --git a/tests/pools/thread/fixed.test.js b/tests/pools/thread/fixed.test.js index b70d4c62..3401fde3 100644 --- a/tests/pools/thread/fixed.test.js +++ b/tests/pools/thread/fixed.test.js @@ -12,7 +12,7 @@ const pool = new FixedThreadPool( const emptyPool = new FixedThreadPool( 1, './tests/worker-files/thread/emptyWorker.js', - { exitHandler: () => console.log('WORKER EXITED') } + { exitHandler: () => console.log('empty pool worker exited') } ) const echoPool = new FixedThreadPool( 1, @@ -26,6 +26,14 @@ const errorPool = new FixedThreadPool( onlineHandler: () => console.log('worker is online') } ) +const asyncErrorPool = new FixedThreadPool( + 1, + './tests/worker-files/thread/asyncErrorWorker.js', + { + errorHandler: e => console.error(e), + onlineHandler: () => console.log('worker is online') + } +) const asyncPool = new FixedThreadPool( 1, './tests/worker-files/thread/asyncWorker.js' @@ -37,6 +45,7 @@ describe('Fixed thread pool test suite', () => { await echoPool.destroy() await asyncPool.destroy() await errorPool.destroy() + await asyncErrorPool.destroy() await emptyPool.destroy() }) @@ -60,6 +69,16 @@ describe('Fixed thread pool test suite', () => { expect(result).toBeFalsy() }) + it('Verify that busy event is emitted', async () => { + const promises = [] + let poolBusy = 0 + pool.emitter.on('busy', () => poolBusy++) + for (let i = 0; i < numberOfThreads * 2; i++) { + promises.push(pool.execute({ test: 'test' })) + } + expect(poolBusy).toEqual(numberOfThreads) + }) + it('Verify that is possible to have a worker that return undefined', async () => { const result = await emptyPool.execute() expect(result).toBeFalsy() @@ -72,7 +91,7 @@ describe('Fixed thread pool test suite', () => { expect(result.f).toBe(data.f) }) - it('Verify that error handling is working properly', async () => { + it('Verify that error handling is working properly:sync', async () => { const data = { f: 10 } let inError try { @@ -80,9 +99,24 @@ describe('Fixed thread pool test suite', () => { } catch (e) { inError = e } - expect(inError).toBeTruthy() - expect(inError instanceof Error).toBeTruthy() - expect(inError.message).toBeTruthy() + expect(inError).toBeDefined() + expect(inError).toBeInstanceOf(Error) + expect(inError.message).toBeDefined() + expect(typeof inError.message === 'string').toEqual(true) + }) + + it('Verify that error handling is working properly:async', async () => { + const data = { f: 10 } + let inError + try { + await asyncErrorPool.execute(data) + } catch (e) { + inError = e + } + expect(inError).toBeDefined() + expect(inError).toBeInstanceOf(Error) + expect(inError.message).toBeDefined() + expect(typeof inError.message === 'string').toEqual(true) }) it('Verify that async function is working properly', async () => { diff --git a/tests/worker-files/thread/asyncErrorWorker.js b/tests/worker-files/thread/asyncErrorWorker.js new file mode 100644 index 00000000..d973f0a4 --- /dev/null +++ b/tests/worker-files/thread/asyncErrorWorker.js @@ -0,0 +1,14 @@ +'use strict' +const { ThreadWorker, KillBehaviors } = require('../../../lib/index') + +async function error (data) { + return new Promise((resolve, reject) => { + setTimeout(() => reject(new Error(data)), 2000) + }) +} + +module.exports = new ThreadWorker(error, { + maxInactiveTime: 500, + async: true, + killBehavior: KillBehaviors.HARD +}) diff --git a/tests/worker-files/thread/errorWorker.js b/tests/worker-files/thread/errorWorker.js index e9f20ab8..cc13c050 100644 --- a/tests/worker-files/thread/errorWorker.js +++ b/tests/worker-files/thread/errorWorker.js @@ -7,5 +7,6 @@ function error (data) { module.exports = new ThreadWorker(error, { maxInactiveTime: 500, + async: false, killBehavior: KillBehaviors.HARD }) -- 2.34.1