All pastes #719885 Raw Edit

Untitled

public java v1 · immutable
#719885 ·published 2007-09-29 18:52 UTC
rendered paste body
    public void despawnWorkers()    {        for (int i = 0; i < workerThreadGroup.length; i++)        {            ThreadGroup group = workerThreadGroup[i];            Thread[] threads = new Thread[group.activeCount()];            group.enumerate(threads);            for (Thread t : threads)            {                System.out.println("[Server]:  \t\t" + t.getName() + " despawned");                ((WorkerThread) t).shutdown();            }            group.destroy();        }    }