1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-02-03 13:27:23 +01:00

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.
This commit is contained in:
Shane Freeder 2024-07-26 13:43:48 +01:00
parent 61ad933f4d
commit 7c88512287

View file

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