List of usage examples for java.lang ThreadGroup ThreadGroup
public ThreadGroup(ThreadGroup parent, String name)
From source file:com.jaeksoft.searchlib.config.Config.java
public ExecutorService getThreadPool() { threadPoolLock.r.lock();//from w w w . j a va 2 s . co m try { if (threadPool != null) return threadPool; } finally { threadPoolLock.r.unlock(); } threadPoolLock.w.lock(); try { if (threadPool != null) return threadPool; if (threadGroup == null) threadGroup = new ThreadGroup(ClientCatalog.getThreadGroup(), getIndexName()); threadPool = Executors.newCachedThreadPool(this); return threadPool; } finally { threadPoolLock.w.unlock(); } }
From source file:org.xmlsh.sh.shell.Shell.java
public ThreadGroup newThreadGroup(String name) { return new ThreadGroup(getThreadGroup(), name); }