瀏覽代碼

异步线程修改

kk 1 月之前
父節點
當前提交
c8adfeee59
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      game-business/src/main/java/com/game/business/config/AsyncConfig.java

+ 3 - 3
game-business/src/main/java/com/game/business/config/AsyncConfig.java

@@ -15,9 +15,9 @@ public class AsyncConfig {
     @Bean(name = "asyncExecutor")
     public Executor asyncExecutor() {
         ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
-        executor.setCorePoolSize(50); // 核心线程数
-        executor.setMaxPoolSize(200); // 最大线程数
-        executor.setQueueCapacity(250); // 队列大小
+        executor.setCorePoolSize(200); // 核心线程数
+        executor.setMaxPoolSize(800); // 最大线程数
+        executor.setQueueCapacity(900); // 队列大小
         executor.setKeepAliveSeconds(60); // 线程空闲时的存活时间
         executor.setThreadNamePrefix("aynTask-"); // 线程名前缀
         executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); // 拒绝策略