repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: sync worker choice context constructor comment
[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 91ceb5bc9ade9e8d8df8be244c54fd105b76771a..29b05fa507f0b3ca8a18a300ad1c6927d9b76a65 100644
(file)
--- a/
src/pools/selection-strategies/round-robin-worker-choice-strategy.ts
+++ b/
src/pools/selection-strategies/round-robin-worker-choice-strategy.ts
@@
-15,19
+15,19
@@
export class RoundRobinWorkerChoiceStrategy<
Response = unknown
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
Response = unknown
>
extends AbstractWorkerChoiceStrategy<Worker, Data, Response>
- implements IWorkerChoiceStrategy
<Worker, Data, Response>
{
+ implements IWorkerChoiceStrategy {
/**
* Id of the next worker.
*/
private nextWorkerId: number = 0
/**
* Id of the next worker.
*/
private nextWorkerId: number = 0
- /**
{@inheritDoc}
*/
+ /**
@inheritDoc
*/
public reset (): boolean {
this.nextWorkerId = 0
return true
}
public reset (): boolean {
this.nextWorkerId = 0
return true
}
- /**
{@inheritDoc}
*/
+ /**
@inheritDoc
*/
public choose (): number {
const chosenWorkerKey = this.nextWorkerId
this.nextWorkerId =
public choose (): number {
const chosenWorkerKey = this.nextWorkerId
this.nextWorkerId =
@@
-37,7
+37,7
@@
export class RoundRobinWorkerChoiceStrategy<
return chosenWorkerKey
}
return chosenWorkerKey
}
- /**
{@inheritDoc}
*/
+ /**
@inheritDoc
*/
public remove (workerKey: number): boolean {
if (this.nextWorkerId === workerKey) {
if (this.pool.workers.length === 0) {
public remove (workerKey: number): boolean {
if (this.nextWorkerId === workerKey) {
if (this.pool.workers.length === 0) {