Skip to content

Commit

Permalink
v3.5.1发布
Browse files Browse the repository at this point in the history
  • Loading branch information
x201206030 committed Jan 25, 2021
1 parent c567e37 commit 521142a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public class ThreadPoolProperties {
private Integer corePoolSize;
private Integer maximumPoolSize;
private Long keepAliveTime;
private Integer queueSize;


}
10 changes: 6 additions & 4 deletions novel-front/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 4 additions & 2 deletions novel-front/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ thread:
#核心线程池数量
core-pool-size: 10
#最大线程池数量
maximum-pool-size: 200
#线程超时时间分钟
maximum-pool-size: 20
#线程超时时间
keep-alive-time: 10
#队列大小
queue-size: 1000


0 comments on commit 521142a

Please sign in to comment.