class ParallelExecutorService {

    public ExecutorService getExecutorService() {
        ExecutorService instance = executorService;
        if (instance == null) {
            synchronized (this) {
                instance = executorService;
                if (instance == null) {
                    instance = createExecutorService();
                    executorService = instance;
                }
            }
        }
        return instance;
    }

}