diff --git a/src/main/java/com/threerings/getdown/data/Digest.java b/src/main/java/com/threerings/getdown/data/Digest.java index 9d085eb..0cd7a40 100644 --- a/src/main/java/com/threerings/getdown/data/Digest.java +++ b/src/main/java/com/threerings/getdown/data/Digest.java @@ -48,7 +48,8 @@ public class Digest throws IOException { // first compute the digests for all the resources in parallel - Executor exec = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); + ExecutorService exec = Executors.newFixedThreadPool( + Runtime.getRuntime().availableProcessors()); final Map digests = new ConcurrentHashMap<>(); final BlockingQueue completed = new LinkedBlockingQueue<>(); final int fversion = version; @@ -71,6 +72,9 @@ public class Digest }); } + // queue a shutdown of the thread pool when the tasks are done + exec.shutdown(); + try { while (pending.size() > 0) { Object done = completed.poll(600, TimeUnit.SECONDS);