修改不定长线程池

This commit is contained in:
wuweifeng10 2021-11-11 11:04:00 +08:00
parent 4ea14f355b
commit bc4affb2b5

View File

@ -18,11 +18,7 @@ public class Async {
/**
* 默认线程池
*/
private static final ThreadPoolExecutor COMMON_POOL =
new ThreadPoolExecutor(Runtime.getRuntime().availableProcessors() * 2, 1024,
15L, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(),
(ThreadFactory) Thread::new);
private static final ThreadPoolExecutor COMMON_POOL = (ThreadPoolExecutor) Executors.newCachedThreadPool();;
private static ExecutorService executorService;