v3.5.1发布

This commit is contained in:
xiongxiaoyang 2021-01-25 16:56:41 +08:00
parent c567e37423
commit 521142a792
4 changed files with 12 additions and 7 deletions

View File

@ -17,7 +17,7 @@ public class ThreadPoolConfig {
@Bean
public ThreadPoolExecutor threadPoolExecutor(ThreadPoolProperties properties){
return new ThreadPoolExecutor(properties.getCorePoolSize(),properties.getMaximumPoolSize(),properties.getKeepAliveTime()
, TimeUnit.MINUTES, new LinkedBlockingDeque<>(),new ThreadPoolExecutor.AbortPolicy());
, TimeUnit.SECONDS, new LinkedBlockingDeque<>(properties.getQueueSize()),new ThreadPoolExecutor.AbortPolicy());
}
}

View File

@ -16,6 +16,7 @@ public class ThreadPoolProperties {
private Integer corePoolSize;
private Integer maximumPoolSize;
private Long keepAliveTime;
private Integer queueSize;
}

View File

@ -15,8 +15,10 @@ pic:
thread:
pool:
#核心线程池数量
core-pool-size: 100
core-pool-size: 10
#最大线程池数量
maximum-pool-size: 10000
#线程超时时间分钟
keep-alive-time: 10
maximum-pool-size: 20
#线程超时时间
keep-alive-time: 10
#队列大小
queue-size: 100

View File

@ -28,8 +28,10 @@ thread:
#核心线程池数量
core-pool-size: 10
#最大线程池数量
maximum-pool-size: 200
#线程超时时间分钟
maximum-pool-size: 20
#线程超时时间
keep-alive-time: 10
#队列大小
queue-size: 1000