Commit | Line | Data |
---|---|---|
6013bc53 JB |
1 | import Configuration from '../utils/Configuration'; |
2 | import WorkerPool from './WorkerPool'; | |
3 | import WorkerSet from './WorkerSet'; | |
144cabe0 | 4 | import Wrk from './Wrk'; |
6013bc53 JB |
5 | |
6 | export default class WorkerFactory { | |
7 | public static getWorkerImpl(workerScript: string): Wrk { | |
8 | if (Configuration.useWorkerPool()) { | |
9 | return new WorkerPool(workerScript); | |
10 | } | |
11 | return new WorkerSet(workerScript, Configuration.getChargingStationsPerWorker()); | |
12 | } | |
13 | } |