Fix main thread priority being lowered (#9488)
This commit is contained in:
parent
a73ed9572e
commit
6520ca1c47
1 changed files with 8 additions and 8 deletions
|
@ -79,14 +79,14 @@ index 0f05d26248d8c999048a88796df227a6a1e3755f..7354711e194ab58b11b68f447c1fc795
|
||||||
return executorService;
|
return executorService;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 9cd0e389deda8d0bc7a551ff9e8b6bcd51184476..ed66f20b38fb6cea0dab020d8ffdde894da86113 100644
|
index 9cd0e389deda8d0bc7a551ff9e8b6bcd51184476..3289e2ec79c760ba8c1c47ed1baaba136682d8e8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -319,6 +319,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||||
S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
|
thread.setUncaughtExceptionHandler((thread1, throwable) -> {
|
||||||
|
MinecraftServer.LOGGER.error("Uncaught exception in server thread", throwable);
|
||||||
atomicreference.set(s0);
|
});
|
||||||
+ thread.setPriority(Thread.NORM_PRIORITY+2); // Paper - boost priority
|
+ thread.setPriority(Thread.NORM_PRIORITY+2); // Paper - boost priority
|
||||||
thread.start();
|
if (Runtime.getRuntime().availableProcessors() > 4) {
|
||||||
return s0;
|
thread.setPriority(8);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue