mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-07-11 18:57:06 +08:00
commit
98b7e4fc45
@ -273,7 +273,7 @@ public class ThreadPoolExecutorConfig {
|
||||
int maxPoolSize = (int) (processNum / (1 - 0.5));
|
||||
threadPoolExecutor.setCorePoolSize(corePoolSize); // 核心池大小
|
||||
threadPoolExecutor.setMaxPoolSize(maxPoolSize); // 最大线程数
|
||||
threadPoolExecutor.setQueueCapacity(maxPoolSize * 1000); // 队列程度
|
||||
threadPoolExecutor.setQueueCapacity(maxPoolSize * 1000); // 队列长度
|
||||
threadPoolExecutor.setThreadPriority(Thread.MAX_PRIORITY);
|
||||
threadPoolExecutor.setDaemon(false);
|
||||
threadPoolExecutor.setKeepAliveSeconds(300);// 线程空闲时间
|
||||
|
Loading…
x
Reference in New Issue
Block a user