diff --git a/src/main/java/fr/ntr/Main.java b/src/main/java/fr/ntr/Main.java index fc7d4da..666ded6 100644 --- a/src/main/java/fr/ntr/Main.java +++ b/src/main/java/fr/ntr/Main.java @@ -1,5 +1,7 @@ package fr.ntr; +import fr.ntr.scheduler.MaxSNR; +import fr.ntr.scheduler.ProportionalFair; import fr.ntr.scheduler.RoundRobin; import fr.ntr.scheduler.Scheduler; @@ -13,6 +15,7 @@ import java.util.Objects; import java.util.Random; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; public class Main { @@ -100,7 +103,15 @@ public class Main { System.exit(1); } } - executor.close(); + executor.shutdown(); + try { + executor.awaitTermination(2, TimeUnit.MINUTES); + } + catch (InterruptedException e) { + e.printStackTrace(); + } + executor.shutdownNow(); + System.out.println("Executor closed"); } else {