mirror of
https://github.com/LamGC/ContentGrabbingJi.git
synced 2025-04-30 06:37:36 +00:00
[Change] BotEventHandler 调整事件处理线程池的线程数(min: 4, Max: 32);
This commit is contained in:
parent
bef6a684b9
commit
cf08353ed9
@ -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,
|
||||||
Runtime.getRuntime().availableProcessors(),
|
Math.max(Runtime.getRuntime().availableProcessors(), 4),
|
||||||
Math.max(Runtime.getRuntime().availableProcessors() * 2, 16),
|
Math.max(Math.max(Runtime.getRuntime().availableProcessors() * 2, 4), 32),
|
||||||
30L,
|
30L,
|
||||||
TimeUnit.SECONDS,
|
TimeUnit.SECONDS,
|
||||||
new LinkedBlockingQueue<>(1536),
|
new LinkedBlockingQueue<>(1536),
|
||||||
|
Loading…
Reference in New Issue
Block a user