repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: disable esModuleInterop from TS configuration
[poolifier.git]
/
src
/
pools
/
selection-strategies
/
round-robin-worker-choice-strategy.ts
diff --git
a/src/pools/selection-strategies/round-robin-worker-choice-strategy.ts
b/src/pools/selection-strategies/round-robin-worker-choice-strategy.ts
index ea174552685de1ba859a879b893061fe91798de5..835860930b0d76f54c37d547b73274d9bf7fb175 100644
(file)
--- a/
src/pools/selection-strategies/round-robin-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/round-robin-worker-choice-strategy.ts
@@
-4,6
+4,7
@@
import type { IWorker } from '../worker'
import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
import { AbstractWorkerChoiceStrategy } from './abstract-worker-choice-strategy'
import type {
IWorkerChoiceStrategy,
+ StrategyPolicy,
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
WorkerChoiceStrategyOptions
} from './selection-strategies-types'
@@
-11,8
+12,8
@@
import type {
* Selects the next worker in a round robin fashion.
*
* @typeParam Worker - Type of worker which manages the strategy.
* Selects the next worker in a round robin fashion.
*
* @typeParam Worker - Type of worker which manages the strategy.
- * @typeParam Data - Type of data sent to the worker. This can only be s
erializ
able data.
- * @typeParam Response - Type of execution response. This can only be s
erializ
able data.
+ * @typeParam Data - Type of data sent to the worker. This can only be s
tructured-clone
able data.
+ * @typeParam Response - Type of execution response. This can only be s
tructured-clone
able data.
*/
export class RoundRobinWorkerChoiceStrategy<
Worker extends IWorker,
*/
export class RoundRobinWorkerChoiceStrategy<
Worker extends IWorker,
@@
-21,10
+22,10
@@
export class RoundRobinWorkerChoiceStrategy<
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
implements IWorkerChoiceStrategy {
- /**
- * Id of the next worker node.
- */
- private nextWorkerNodeId: number = 0
+ /**
@inheritDoc */
+ public readonly strategyPolicy: StrategyPolicy = {
+ useDynamicWorker: true
+ }
/** @inheritDoc */
public constructor (
/** @inheritDoc */
public constructor (