[Fix] BotEventHandler 修复线程池最大线程数与最低线程数错误, 导致无法启动应用的问题;

This commit is contained in:
LamGC 2020-06-15 17:40:23 +08:00
parent 44a7f49510
commit 3943963505

View File

@ -46,9 +46,9 @@ public class BotEventHandler implements EventHandler {
* 消息事件执行器 * 消息事件执行器
*/ */
private final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor( private final static EventExecutor executor = new EventExecutor(new TimeLimitThreadPoolExecutor(
180000, // 3min 180000, // 3minThr
Math.max(Runtime.getRuntime().availableProcessors(), 4), Math.max(Runtime.getRuntime().availableProcessors(), 4),
Math.min(Runtime.getRuntime().availableProcessors() * 2, 32), Math.min(Math.max(Runtime.getRuntime().availableProcessors(), 4), 32),
30L, 30L,
TimeUnit.SECONDS, TimeUnit.SECONDS,
new LinkedBlockingQueue<>(1536), new LinkedBlockingQueue<>(1536),