7dde0b73 JB |
1 | const {isMainThread, workerData} = require('worker_threads'); |
2 | const ChargingStation = require('./ChargingStation'); |
3 | |
4 | if (!isMainThread) { |
5 | const station = new ChargingStation(workerData.index, workerData.template); |
6 | station.start(); |
7 | } |