repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: alternate worker selection between start and end of worker nodes
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
less-used-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/less-used-worker-choice-strategy.ts
b/src/pools/selection-strategies/less-used-worker-choice-strategy.ts
index 1138df952a4600b31ff4f60a5540b94f035b31b3..e3c395f477e4adb1d8a042ca71317c84111aae60 100644
(file)
--- a/
src/pools/selection-strategies/less-used-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/less-used-worker-choice-strategy.ts
@@
-27,7
+27,7
@@
export class LessUsedWorkerChoiceStrategy<
opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
) {
super(pool, opts)
opts: WorkerChoiceStrategyOptions = DEFAULT_WORKER_CHOICE_STRATEGY_OPTIONS
) {
super(pool, opts)
- this.checkOptions(opts)
+ this.checkOptions(
this.
opts)
}
/** @inheritDoc */
}
/** @inheritDoc */
@@
-37,7
+37,7
@@
export class LessUsedWorkerChoiceStrategy<
/** @inheritDoc */
public choose (): number {
/** @inheritDoc */
public choose (): number {
- const freeWorkerNodeKey = this.
pool.
findFreeWorkerNodeKey()
+ const freeWorkerNodeKey = this.findFreeWorkerNodeKey()
if (freeWorkerNodeKey !== -1) {
return freeWorkerNodeKey
}
if (freeWorkerNodeKey !== -1) {
return freeWorkerNodeKey
}