repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ccf1118
)
refactor: preincrement worker set counter
author
Jérôme Benoit
<jerome.benoit@sap.com>
Sat, 23 Mar 2024 00:19:53 +0000
(
01:19
+0100)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Sat, 23 Mar 2024 00:19:53 +0000
(
01:19
+0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/worker/WorkerSet.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/worker/WorkerSet.ts
b/src/worker/WorkerSet.ts
index 80f502c2f582d795c37211ce027586e73d29aeb7..4e360db8fa89b8a929cd60fd90a376058b0e2517 100644
(file)
--- a/
src/worker/WorkerSet.ts
+++ b/
src/worker/WorkerSet.ts
@@
-159,7
+159,7
@@
export class WorkerSet<D extends WorkerData, R extends WorkerData> extends Worke
const { resolve, reject, workerSetElement } = this.promiseResponseMap.get(uuid)!
if (event === WorkerMessageEvents.addedWorkerElement) {
this.emitter?.emit(WorkerSetEvents.elementAdded, this.info)
- workerSetElement.numberOfWorkerElements++
+ ++workerSetElement.numberOfWorkerElements
resolve(data)
} else if (event === WorkerMessageEvents.workerElementError) {
this.emitter?.emit(WorkerSetEvents.elementError, data)