feat: add per task function strategy support
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 28 Apr 2024 16:24:19 +0000 (18:24 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 28 Apr 2024 16:24:19 +0000 (18:24 +0200)
commitbcfb06ce041a682baf396a099c633a848d6a4045
treecc3565e692d4afda83df9c4d10177ef4a3ad68f0
parent31847469b406e46688d8aafb880e250706dd8aee
feat: add per task function strategy support

Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
20 files changed:
docs/api.md
src/index.ts
src/pools/abstract-pool.ts
src/pools/pool.ts
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
src/pools/selection-strategies/selection-strategies-utils.ts [new file with mode: 0644]
src/pools/selection-strategies/worker-choice-strategies-context.ts [new file with mode: 0644]
src/pools/selection-strategies/worker-choice-strategy-context.ts [deleted file]
src/pools/utils.ts
src/priority-queue.ts [new file with mode: 0644]
src/utils.ts
src/worker/abstract-worker.ts
src/worker/utils.ts
tests/pools/abstract-pool.test.mjs
tests/pools/cluster/dynamic.test.mjs
tests/pools/selection-strategies/selection-strategies.test.mjs
tests/pools/selection-strategies/strategies-utils.test.mjs [new file with mode: 0644]
tests/pools/selection-strategies/worker-choice-strategy-context.test.mjs
tests/pools/thread/dynamic.test.mjs
tests/pools/utils.test.mjs