Commit | Line | Data |
---|---|---|
6af9012e | 1 | import { isMainThread, workerData } from 'worker_threads'; |
3f40bc9c | 2 | |
6af9012e | 3 | import ChargingStation from './ChargingStation'; |
7dde0b73 JB |
4 | |
5 | if (!isMainThread) { | |
2e6f5966 | 6 | const station = new ChargingStation(workerData.index, workerData.templateFile); |
7dde0b73 JB |
7 | station.start(); |
8 | } |