[Change] BotEventHandler 调整事件处理线程池的线程数;

This commit is contained in:
LamGC 2020-05-04 22:46:06 +08:00
parent 04960889b4
commit bef6a684b9

View File

@ -52,8 +52,8 @@ public class BotEventHandler implements EventHandler {
*/ */
public final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor( public final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor(
60 * 1000, 60 * 1000,
(int) Math.ceil(Runtime.getRuntime().availableProcessors() / 2F),
Runtime.getRuntime().availableProcessors(), Runtime.getRuntime().availableProcessors(),
Math.max(Runtime.getRuntime().availableProcessors() * 2, 16),
30L, 30L,
TimeUnit.SECONDS, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(1536), new LinkedBlockingQueue<>(1536),