dont kill the main thread until all elevator threads die . concode_field_sep FileReader input concode_elem_sep int threads concode_elem_sep BufferedReader fileBuffer concode_elem_sep ArrayList<ArrayList<PassengerArrival>> configuration concode_elem_sep int simRate concode_elem_sep Elevator[] elevators concode_elem_sep boolean finished concode_elem_sep BuildingManager buildingManager concode_elem_sep int simLength concode_field_sep void printElevatorsState concode_elem_sep void assignQueue concode_elem_sep void printBuildingState concode_elem_sep void initArrays concode_elem_sep void spawnThreads concode_elem_sep void start concode_elem_sep boolean isFinished concode_elem_sep void readFileConfig
void function ( ) { while ( true ) { int loc0 = 0 ; for ( int loc1 = 0 ; loc1 < ElevatorSimulation . threads ; ++ loc1 ) { if ( elevators [ loc1 ] . isFinished ( ) ) loc0 ++ ; } if ( loc0 == ElevatorSimulation . threads ) return ; } }