geforkt von Mirrors/Paper
70ce6ce831
This makes it easier for downstream projects (forks) to replace the version fetching system with their own. It is as simple as implementing an interface and overriding the default implementation of org.bukkit.UnsafeValues#getVersionFetcher() It also makes it easier for us to organize things like the version history feature. Lastly I have updated the paper implementation to check against the site API rather than against jenkins.
23 Zeilen
910 B
Diff
23 Zeilen
910 B
Diff
From 751ed975c22f7fd9c400d0c038fddd3f23c5d158 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Tue, 23 Oct 2018 23:14:38 -0400
|
|
Subject: [PATCH] Use more reasonable thread count default for bootstrap
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
|
index 5fae5a123..6bc576f10 100644
|
|
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
|
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
|
@@ -66,7 +66,7 @@ public class SystemUtils {
|
|
}
|
|
|
|
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) {
|
|
--
|
|
2.21.0
|
|
|