Bug: https://bugs.openjdk.java.net/browse/JDK-8157528
snippetThread.start();
Thread[] threadList = new Thread[execThreadGroup.activeCount()];
execThreadGroup.enumerate(threadList);
for (Thread thread : threadList) {
+ if (thread != null)
thread.join();
}
if (stopped.get()) {
debug("Killed.");