mirror of
https://github.com/YatopiaMC/Yatopia.git
synced 2024-11-26 04:25:39 +01:00
Shutdown Bootstrap thread pool (#194)
This commit is contained in:
parent
7f58748ead
commit
28ac090db1
@ -106,6 +106,7 @@ # Patches
|
||||
| server | Respect PlayerKickEvent leaveMessage | Ivan Pekov | |
|
||||
| server | Respect permissions when constructing InventoryEnderChest | Ivan Pekov | |
|
||||
| server | Send more packets immediately | MrIvanPlays | |
|
||||
| server | Shutdown Bootstrap thread pool | foss-mc | |
|
||||
| server | Skip events if there's no listeners | William Blake Galbreath | |
|
||||
| server | Snowman drop and put back pumpkin | William Blake Galbreath | |
|
||||
| server | Squid EAR immunity | William Blake Galbreath | |
|
||||
|
53
patches/server/0050-Shutdown-Bootstrap-thread-pool.patch
Normal file
53
patches/server/0050-Shutdown-Bootstrap-thread-pool.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: foss-mc <69294560+foss-mc@users.noreply.github.com>
|
||||
Date: Sat, 12 Sep 2020 11:12:23 +0800
|
||||
Subject: [PATCH] Shutdown Bootstrap thread pool
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
index 48e31e9142ffeb2725af6b1f483de67410e25694..b149e32aac86ce2f7521958fa7394e4f5b852174 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
@@ -15,14 +15,16 @@ public class DataConverterRegistry {
|
||||
|
||||
private static final BiFunction<Integer, Schema, Schema> a = Schema::new;
|
||||
private static final BiFunction<Integer, Schema, Schema> b = DataConverterSchemaNamed::new;
|
||||
- private static final DataFixer c = b();
|
||||
-
|
||||
- private static DataFixer b() {
|
||||
+ // Yatopia start
|
||||
+ private static final DataFixer c;
|
||||
+ static {
|
||||
DataFixerBuilder datafixerbuilder = new DataFixerBuilder(SharedConstants.getGameVersion().getWorldVersion());
|
||||
|
||||
a(datafixerbuilder);
|
||||
- return datafixerbuilder.build(SystemUtils.e());
|
||||
+ c = datafixerbuilder.build(SystemUtils.d);
|
||||
+ SystemUtils.d.shutdown();
|
||||
}
|
||||
+ // Yatopia end
|
||||
|
||||
public static DataFixer getDataFixer() { return a(); } // Paper - OBFHELPER
|
||||
public static DataFixer a() {
|
||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
index 20f1c25db110c17eff6630c9db2e109e58159a22..51cbe01e171f8019a8b57c91c55980280d6857db 100644
|
||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
@@ -48,7 +48,7 @@ import org.apache.logging.log4j.Logger;
|
||||
public class SystemUtils {
|
||||
|
||||
private static final AtomicInteger c = new AtomicInteger(1);
|
||||
- private static final ExecutorService d = a("Bootstrap");
|
||||
+ public static final ExecutorService d = a("Bootstrap"); // Yatopia - private -> public
|
||||
private static final ExecutorService e = a("Main");
|
||||
private static final ExecutorService f = n();
|
||||
public static LongSupplier a = System::nanoTime;
|
||||
@@ -111,7 +111,7 @@ public class SystemUtils {
|
||||
return (ExecutorService) object;
|
||||
}
|
||||
|
||||
- public static Executor e() {
|
||||
+ public static Executor e_unused() { // Yatopia - unused
|
||||
return SystemUtils.d;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user