repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf: take into account the number of run tasks in LRU worker choice
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
abstract-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts
b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts
index 314c13c0cd02063a569a8ee5997a1d748b13cdbd..ebe74dcb07543b7c7698e2c2f284c33893b6e9ca 100644
(file)
--- a/
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/abstract-worker-choice-strategy.ts
@@
-19,7
+19,7
@@
export abstract class AbstractWorkerChoiceStrategy<
Response
> implements IWorkerChoiceStrategy<Worker> {
/** {@inheritDoc} */
Response
> implements IWorkerChoiceStrategy<Worker> {
/** {@inheritDoc} */
- public readonly isDynamicPool: boolean
= this.pool.type === PoolType.DYNAMIC
+ public readonly isDynamicPool: boolean
/** {@inheritDoc} */
public requiredStatistics: RequiredStatistics = {
runTime: false
/** {@inheritDoc} */
public requiredStatistics: RequiredStatistics = {
runTime: false
@@
-32,7
+32,9
@@
export abstract class AbstractWorkerChoiceStrategy<
*/
public constructor (
protected readonly pool: IPoolInternal<Worker, Data, Response>
*/
public constructor (
protected readonly pool: IPoolInternal<Worker, Data, Response>
- ) {}
+ ) {
+ this.isDynamicPool = this.pool.type === PoolType.DYNAMIC
+ }
/** {@inheritDoc} */
public abstract reset (): boolean
/** {@inheritDoc} */
public abstract reset (): boolean