[Change] BotEventHandler 调整事件处理线程池的线程数(min: 4, Max: 32);

This commit is contained in:
LamGC 2020-05-04 22:52:47 +08:00
parent bef6a684b9
commit cf08353ed9

View File

@ -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),