From 7c885122879935c806236c143e5213cfaa8fa065 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Fri, 26 Jul 2024 13:43:48 +0100 Subject: [PATCH] Bump MCUtils#asyncExecutor core size Long ago we discovered that the default thread pools would not increase the number of threads running the pool until queue addition failed. Bumping the core size mitigates an issue with spark-paper, and in general, keeping async threads around generally beats having to spin new ones everytime we want to execute a periodic async task. --- patches/server/MC-Utils.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/MC-Utils.patch b/patches/server/MC-Utils.patch index 1f136fe3bb..78f476b01d 100644 --- a/patches/server/MC-Utils.patch +++ b/patches/server/MC-Utils.patch @@ -4114,7 +4114,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + } + }; + public static final ThreadPoolExecutor asyncExecutor = new ThreadPoolExecutor( -+ 0, 2, 60L, TimeUnit.SECONDS, ++ 2, 2, 60L, TimeUnit.SECONDS, + new LinkedBlockingQueue<>(), + new ThreadFactoryBuilder() + .setNameFormat("Paper Async Task Handler Thread - %1$d")