repositories
/
e-mobility-charging-stations-simulator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git]
/
src
/
worker
/
WorkerStaticPool.ts
diff --git
a/src/worker/WorkerStaticPool.ts
b/src/worker/WorkerStaticPool.ts
index 392981237289a78044af6d3a0cd8830eb6888210..acc61b8fad0fadac0fa66a7f7433a9e143db4658 100644
(file)
--- a/
src/worker/WorkerStaticPool.ts
+++ b/
src/worker/WorkerStaticPool.ts
@@
-13,12
+13,12
@@
export class WorkerStaticPool extends WorkerAbstract<WorkerData> {
* @param workerScript -
* @param workerOptions -
*/
* @param workerScript -
* @param workerOptions -
*/
- constructor(workerScript: string, workerOptions
?
: WorkerOptions) {
+ constructor(workerScript: string, workerOptions: WorkerOptions) {
super(workerScript, workerOptions);
this.pool = new FixedThreadPool(
this.workerOptions.poolMaxSize,
this.workerScript,
super(workerScript, workerOptions);
this.pool = new FixedThreadPool(
this.workerOptions.poolMaxSize,
this.workerScript,
- this.workerOptions.poolOptions
+ this.workerOptions.poolOptions
,
);
}
);
}
@@
-52,6
+52,7
@@
export class WorkerStaticPool extends WorkerAbstract<WorkerData> {
public async addElement(elementData: WorkerData): Promise<void> {
await this.pool.execute(elementData);
// Start element sequentially to optimize memory at startup
public async addElement(elementData: WorkerData): Promise<void> {
await this.pool.execute(elementData);
// Start element sequentially to optimize memory at startup
- this.workerOptions.elementStartDelay > 0 && (await sleep(this.workerOptions.elementStartDelay));
+ this.workerOptions.elementStartDelay! > 0 &&
+ (await sleep(this.workerOptions.elementStartDelay!));
}
}
}
}