1. ThreadPoolExecutor
// 커스텀
ExecutorService threadPool = new ThreadPoolExecutor(
    3, // 코어 스레드 개수
    100, // 최대 스레드 개수
    120L, // 최대 놀 수 있는 시간 (이 시간 넘으면 스레드 풀에서 쫓겨 남.)
    TimeUnit.SECONDS, // 놀 수 있는 시간 단위
    new SynchronousQueue<Runnable>() // 작업 큐
);
  1. Executors 클래스에서 제공하는 Static Factory Method 사용
ExecutorService executorService = Executors.newCachedThreadPool();

ExecutorService executorService = Executors.newFixedThreadPool(int nThreads);

ExecutorService executorService = Executors.newSingleThreadExecutor();

CachedThreadPool

FixedThreadPool

SingleThreadExecutor