From bbb6346aff5f4df02aacdde618159790f11b0329 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Sat, 22 Oct 2016 00:31:10 +1100 Subject: [PATCH] Fixes #336 - Though you should also update to Java 8 --- core/src/main/java/com/boydti/fawe/util/SetQueue.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/com/boydti/fawe/util/SetQueue.java b/core/src/main/java/com/boydti/fawe/util/SetQueue.java index 6a97c4c7..86984fb8 100644 --- a/core/src/main/java/com/boydti/fawe/util/SetQueue.java +++ b/core/src/main/java/com/boydti/fawe/util/SetQueue.java @@ -115,13 +115,8 @@ public class SetQueue { if (Fawe.get().isJava8()) { pool.awaitQuiescence(Long.MAX_VALUE, TimeUnit.MILLISECONDS); } else { - try { - for (Runnable run : pool.shutdownNow()) { - run.run(); - } - } catch (Throwable e) { - e.printStackTrace(); - } + pool.shutdown(); + pool.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); pool = new ForkJoinPool(); } }