Here you can find the source of getExecutorService()
private static ExecutorService getExecutorService()
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; public class Main { private static ExecutorService executorService; private static ExecutorService getExecutorService() { if (executorService == null) { executorService = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 2 + 2); }//from www . java 2 s. co m return executorService; } }