| 1 | import { isMainThread, workerData } from 'worker_threads'; |
| 2 | |
| 3 | import ChargingStation from './ChargingStation'; |
| 4 | |
| 5 | if (!isMainThread) { |
| 6 | const station = new ChargingStation(workerData.index as number, workerData.templateFile as string); |
| 7 | station.start(); |
| 8 | } |