线程池工作原理

翊梦 / 2023-05-31 / 原文

一、线程池工作流程

创建一个线程池,ThreadPoolExecutor executor = new ThreadPoolExecutor(2, 5, 10, TimeUnit.SECONDS, new ArrayBlockingQueue(10), new ThreadPoolExecutor.AbortPolicy());