refactor: 调整异步线程数

This commit is contained in:
Captain.B 2021-08-18 12:21:35 +08:00 committed by 刘瑞斌
parent 71c5042e71
commit e8c3f23fdf
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@ public class AsyncConfig {
public AsyncTaskExecutor taskExecutor() {
ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
executor.setThreadNamePrefix("Async-Executor-");
executor.setCorePoolSize(10);
executor.setCorePoolSize(20);
executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
return executor;
}