Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { public static void threadGroupJoin(ThreadGroup threadGroup) throws InterruptedException { synchronized (threadGroup) { while (threadGroup.activeCount() > 0) { threadGroup.wait(10); } } } }