优化公共动态线程池配置.

pull/84/head
chen.ma 3 years ago
parent cac3220d85
commit e969146eb4

@ -18,10 +18,10 @@ public class CommonDynamicThreadPool {
DynamicThreadPoolExecutor poolExecutor = (DynamicThreadPoolExecutor) ThreadPoolBuilder.builder() DynamicThreadPoolExecutor poolExecutor = (DynamicThreadPoolExecutor) ThreadPoolBuilder.builder()
.dynamicPool() .dynamicPool()
.threadFactory(threadPoolId) .threadFactory(threadPoolId)
.poolThreadSize(3, 5) .poolThreadSize(2, 4)
.keepAliveTime(1000L, TimeUnit.SECONDS) .keepAliveTime(60L, TimeUnit.SECONDS)
.alarmConfig(1, 80, 80) .alarmConfig(1, 80, 80)
.workQueue(QueueTypeEnum.RESIZABLE_LINKED_BLOCKING_QUEUE, 512) .workQueue(QueueTypeEnum.RESIZABLE_LINKED_BLOCKING_QUEUE, 1024)
.build(); .build();
return poolExecutor; return poolExecutor;
} }

Loading…
Cancel
Save