Example usage for java.lang ThreadGroup ThreadGroup

List of usage examples for java.lang ThreadGroup ThreadGroup

Introduction

In this page you can find the example usage for java.lang ThreadGroup ThreadGroup.

Prototype

public ThreadGroup(ThreadGroup parent, String name) 

Source Link

Document

Creates a new thread group.

Usage

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);
}