2020-04-22 00:06:30 +02:00
From 61e890d07fb29e8986c3e371263e26ca1db4fddd Mon Sep 17 00:00:00 2001
2018-10-24 05:53:13 +02:00
From: Aikar <aikar@aikar.co>
Date: Tue, 23 Oct 2018 23:14:38 -0400
Subject: [PATCH] Use more reasonable thread count default for bootstrap
2019-05-05 13:12:32 +02:00
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
2020-04-22 00:06:30 +02:00
index 7e224ebe..dc6d0306 100644
2019-05-05 13:12:32 +02:00
--- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
2019-05-05 23:39:51 +02:00
@@ -66,7 +66,7 @@ public class SystemUtils {
2019-05-05 13:12:32 +02:00
}
2018-10-24 05:53:13 +02:00
2019-05-05 13:12:32 +02:00
private static ExecutorService k() {
- int i = MathHelper.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 7);
+ int i = Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
Object object;
if (i <= 0) {
2018-10-24 05:53:13 +02:00
--
2020-04-22 00:06:30 +02:00
2.25.1.windows.1
2018-10-24 05:53:13 +02:00