线程池初始化参数

学习了:https://www.jianshu.com/p/210eab345423

 

int corePoolSize => 该线程池中核心线程数最大值
int maximumPoolSize 该线程池中线程总数最大值
long keepAliveTime 该线程池中非核心线程闲置超时时长
TimeUnit unit keepAliveTime的单位
BlockingQueue<Runnable> workQueue 该线程池中的任务队列:维护着等待执行的Runnable对象
ThreadFactory threadFactory 创建线程的方式,这是一个接口,你new他的时候需要实现他的Thread newThread(Runnable r)方法,
RejectedExecutionHandler handler 抛出异常专用的

 

相关文章:

  • 2022-12-23
  • 2021-12-22
  • 2022-12-23
  • 2021-11-13
  • 2021-07-16
  • 2021-10-10
  • 2021-10-22
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2021-05-17
  • 2021-11-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案