From 49502449bb57396eb1c3f3e2407eb9ba93c23f50 Mon Sep 17 00:00:00 2001 From: Warrior <50800980+Warriorrrr@users.noreply.github.com> Date: Tue, 15 Aug 2023 19:37:17 +0200 Subject: [PATCH] Fix main thread priority being lowered (#9488) --- ...ve-Server-Thread-Pool-and-Thread-Priorities.patch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch b/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch index 831ac91231..bcb7fefa51 100644 --- a/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch +++ b/patches/server/Improve-Server-Thread-Pool-and-Thread-Priorities.patch @@ -83,10 +83,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -0,0 +0,0 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop { + MinecraftServer.LOGGER.error("Uncaught exception in server thread", throwable); + }); + thread.setPriority(Thread.NORM_PRIORITY+2); // Paper - boost priority - thread.start(); - return s0; - } + if (Runtime.getRuntime().availableProcessors() > 4) { + thread.setPriority(8); + }