mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-27 01:30:51 +00:00
v3.5.1发布
This commit is contained in:
parent
c567e37423
commit
521142a792
@ -17,7 +17,7 @@ public class ThreadPoolConfig {
|
|||||||
@Bean
|
@Bean
|
||||||
public ThreadPoolExecutor threadPoolExecutor(ThreadPoolProperties properties){
|
public ThreadPoolExecutor threadPoolExecutor(ThreadPoolProperties properties){
|
||||||
return new ThreadPoolExecutor(properties.getCorePoolSize(),properties.getMaximumPoolSize(),properties.getKeepAliveTime()
|
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -16,6 +16,7 @@ public class ThreadPoolProperties {
|
|||||||
private Integer corePoolSize;
|
private Integer corePoolSize;
|
||||||
private Integer maximumPoolSize;
|
private Integer maximumPoolSize;
|
||||||
private Long keepAliveTime;
|
private Long keepAliveTime;
|
||||||
|
private Integer queueSize;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -15,8 +15,10 @@ pic:
|
|||||||
thread:
|
thread:
|
||||||
pool:
|
pool:
|
||||||
#核心线程池数量
|
#核心线程池数量
|
||||||
core-pool-size: 100
|
core-pool-size: 10
|
||||||
#最大线程池数量
|
#最大线程池数量
|
||||||
maximum-pool-size: 10000
|
maximum-pool-size: 20
|
||||||
#线程超时时间(分钟)
|
#线程超时时间(秒)
|
||||||
keep-alive-time: 10
|
keep-alive-time: 10
|
||||||
|
#队列大小
|
||||||
|
queue-size: 100
|
@ -28,8 +28,10 @@ thread:
|
|||||||
#核心线程池数量
|
#核心线程池数量
|
||||||
core-pool-size: 10
|
core-pool-size: 10
|
||||||
#最大线程池数量
|
#最大线程池数量
|
||||||
maximum-pool-size: 200
|
maximum-pool-size: 20
|
||||||
#线程超时时间(分钟)
|
#线程超时时间(秒)
|
||||||
keep-alive-time: 10
|
keep-alive-time: 10
|
||||||
|
#队列大小
|
||||||
|
queue-size: 1000
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user