static L allThreads_fast() { ThreadGroup rootGroup = rootThreadGroup(); Thread[] threads = new Thread[rootGroup.activeCount()+10]; int n; while ((n = rootGroup.enumerate(threads, true)) == threads.length) threads = new Thread[threads.length*2]; L l = new ArrayList(n); for (int i = 0; i < n; i++) l.add(threads[i]); ret l; }