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

Merge pull request #2689 from blueair5/fix-main

修改线程池最佳实践示例代码中的错别字
This commit is contained in:
Guide 2025-07-02 19:58:15 +08:00 committed by GitHub
commit 98b7e4fc45
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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