From 6cc0bb434bdf780e20b6e9220bcbcefb77107c35 Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Fri, 27 Nov 2020 09:11:48 +0300 Subject: [PATCH] Unstable test (multiple exceptions) --- src/MakkahCity.java | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/src/MakkahCity.java b/src/MakkahCity.java index 41ff1ae..e25c265 100644 --- a/src/MakkahCity.java +++ b/src/MakkahCity.java @@ -63,21 +63,9 @@ public class MakkahCity { clearDoneCivilVehicles(); for (Vehicle vehicle : listOfVehicles) { VMover m = new VMover(vehicle); - threads.add(new Thread(m)); - } - for (int i = 0; i < threads.size(); i += 4){ - threads.get(i).start(); - threads.get(i+1).start(); - threads.get(i+2).start(); - threads.get(i+3).start(); - try { - threads.get(i).join(); - threads.get(i+1).join(); - threads.get(i+2).join(); - threads.get(i+3).join(); - } catch (InterruptedException e) { - e.printStackTrace(); - } + //threads.add(new Thread(m)); + Thread t = new Thread(m); + t.start(); } //noise based on time of day (From PDate) firstDayTimeMan.step(Calendar.MINUTE, 1);