1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-07-11 18:57:06 +08:00

修改线程池最佳实践示例代码中的错别字

This commit is contained in:
seaflower 2025-07-02 00:17:00 +08:00
parent 9691335ca7
commit bbab5c5a83

View File

@ -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);// 线程空闲时间