1、怎么创建线程池
用threadPoolExecutor去创建,
核心线程数量,最大线程数量,保活时间,时间单位,工作队列
public ThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue) { this(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, Executors.defaultThreadFactory(), defaultHandler); }
标签:keepAliveTime,maximumPoolSize,线程,workQueue,多线程,问答,unit From: https://www.cnblogs.com/qingmaple/p/17650193.html