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
Cleanup
[e-mobility-charging-stations-simulator.git]
/
src
/
worker
/
WorkerFactory.ts
diff --git
a/src/worker/WorkerFactory.ts
b/src/worker/WorkerFactory.ts
index 65d2f4d4050c761c4ffb69fe323be00449141a6a..8b979d06ca2d76f8e4d0220132b03dafd8a6bf84 100644
(file)
--- a/
src/worker/WorkerFactory.ts
+++ b/
src/worker/WorkerFactory.ts
@@
-9,7
+9,6
@@
import WorkerSet from './WorkerSet';
import WorkerStaticPool from './WorkerStaticPool';
export default class WorkerFactory {
import WorkerStaticPool from './WorkerStaticPool';
export default class WorkerFactory {
- // eslint-disable-next-line @typescript-eslint/no-empty-function
private constructor() {
// This is intentional
}
private constructor() {
// This is intentional
}
@@
-19,9
+18,9
@@
export default class WorkerFactory {
throw new Error('Trying to get a worker implementation outside the main thread');
}
options = options ?? {} as WorkerOptions;
throw new Error('Trying to get a worker implementation outside the main thread');
}
options = options ?? {} as WorkerOptions;
- options.startDelay = options.startDelay ?? Constants.WORKER_START_DELAY;
+ options.startDelay = options
?
.startDelay ?? Constants.WORKER_START_DELAY;
options.poolOptions = options?.poolOptions ?? {} as PoolOptions<Worker>;
options.poolOptions = options?.poolOptions ?? {} as PoolOptions<Worker>;
-
// options?.messageHandler && options.poolOptions.messageHandler = options.messageHandler
;
+
options?.messageHandler && (options.poolOptions.messageHandler = options.messageHandler)
;
let workerImplementation: WorkerAbstract = null;
switch (workerProcessType) {
case WorkerProcessType.WORKER_SET:
let workerImplementation: WorkerAbstract = null;
switch (workerProcessType) {
case WorkerProcessType.WORKER_SET: