创建方式:
1. ThreadPoolExecutor executor = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, handler);
2. Executors工具类创建:
eg:Executors.newFixedThreadPool(nThreads);
工作队列workQueue:
1. ArrayBlockingQueue<Thread>(size):无序
2. LinkedBlockingQueue<Thread>(size):有序
3. SynchronousQueue<Thread>(size):不存储任务,Executors.newCacheThreadPool()用的就是它
拒绝策略handler:
1. AbortPolicy
2. CallerRunsPolicy
3. DiscardPolicy
4. DiscardOldestPolicy