// 커스텀
ExecutorService threadPool = new ThreadPoolExecutor(
3, // 코어 스레드 개수
100, // 최대 스레드 개수
120L, // 최대 놀 수 있는 시간 (이 시간 넘으면 스레드 풀에서 쫓겨 남.)
TimeUnit.SECONDS, // 놀 수 있는 시간 단위
new SynchronousQueue<Runnable>() // 작업 큐
);
ExecutorService executorService = Executors.newCachedThreadPool();
ExecutorService executorService = Executors.newFixedThreadPool(int nThreads);
ExecutorService executorService = Executors.newSingleThreadExecutor();
CachedThreadPool
FixedThreadPool
SingleThreadExecutor