src/Intersection.cpp
void Intersection::simulate()
{
  //Starts the traffic light simulation
  _trafficLight.simulate();

  //Launches vehicle queue processing in a thread
  _threads.emplace_back(std::thread(&Intersection::processVehicleQueue, this));
}
//Virtual function which is executed in thread
Virtual function which is executed in thread
Virtual function which is executed in thread
void Intersection::simulate()
{
  _trafficLight.simulate();
  _threads.emplace_back(std::thread(&Intersection::processVehicleQueue, this));
}
void Intersection :: simulate ( ) { _trafficLight . simulate ( ) ; _threads . emplace_back ( std :: thread ( & Intersection :: processVehicleQueue , this ) ) ; }
Virtual function which is executed in thread
Virtual function which is executed in thread
//Starts the traffic light simulation //Launches vehicle queue processing in a thread