aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2024-07-26 13:43:48 +0100
committerShane Freeder <[email protected]>2024-07-26 13:43:48 +0100
commite1462a925344bc038818dd88871af0139ee35958 (patch)
tree3f1b870c94ee52aa4c165a282af6672873bee14d /patches
parent5a5035be964f3350b06264a31d8add2fa9d2994f (diff)
downloadPaper-e1462a925344bc038818dd88871af0139ee35958.tar.gz
Paper-e1462a925344bc038818dd88871af0139ee35958.zip
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.
Diffstat (limited to 'patches')
-rw-r--r--patches/server/0009-MC-Utils.patch4
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch
index bb4e8413c9..a27ab77534 100644
--- a/patches/server/0009-MC-Utils.patch
+++ b/patches/server/0009-MC-Utils.patch
@@ -4077,7 +4077,7 @@ index 0000000000000000000000000000000000000000..197224e31175252d8438a8df585bbb65
+}
diff --git a/src/main/java/io/papermc/paper/util/MCUtil.java b/src/main/java/io/papermc/paper/util/MCUtil.java
new file mode 100644
-index 0000000000000000000000000000000000000000..c9bebadaf4be03cc92774b7367aeecdd380046f1
+index 0000000000000000000000000000000000000000..0449d4619e3a0752dea0981fb149542e23076c52
--- /dev/null
+++ b/src/main/java/io/papermc/paper/util/MCUtil.java
@@ -0,0 +1,176 @@
@@ -4114,7 +4114,7 @@ index 0000000000000000000000000000000000000000..c9bebadaf4be03cc92774b7367aeecdd
+ }
+ };
+ 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")