From cf08353ed9750fa8671f0debd092ae894f14ad50 Mon Sep 17 00:00:00 2001 From: LamGC Date: Mon, 4 May 2020 22:52:47 +0800 Subject: [PATCH] =?UTF-8?q?[Change]=20BotEventHandler=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=A4=84=E7=90=86=E7=BA=BF=E7=A8=8B=E6=B1=A0?= =?UTF-8?q?=E7=9A=84=E7=BA=BF=E7=A8=8B=E6=95=B0(min:=204,=20Max:=2032);?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/net/lamgc/cgj/bot/event/BotEventHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/lamgc/cgj/bot/event/BotEventHandler.java b/src/main/java/net/lamgc/cgj/bot/event/BotEventHandler.java index e4e7f07..ec04791 100644 --- a/src/main/java/net/lamgc/cgj/bot/event/BotEventHandler.java +++ b/src/main/java/net/lamgc/cgj/bot/event/BotEventHandler.java @@ -52,8 +52,8 @@ public class BotEventHandler implements EventHandler { */ public final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor( 60 * 1000, - Runtime.getRuntime().availableProcessors(), - Math.max(Runtime.getRuntime().availableProcessors() * 2, 16), + Math.max(Runtime.getRuntime().availableProcessors(), 4), + Math.max(Math.max(Runtime.getRuntime().availableProcessors() * 2, 4), 32), 30L, TimeUnit.SECONDS, new LinkedBlockingQueue<>(1536),