mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-23 08:49:28 +00:00
Send multiple keep-alive packets
This commit is contained in:
39
patches/server/0082-Remove-world-upgrade-executors.patch
Normal file
39
patches/server/0082-Remove-world-upgrade-executors.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: MartijnMuijsers <martijnmuijsers@live.nl>
|
||||
Date: Tue, 29 Nov 2022 14:44:23 +0100
|
||||
Subject: [PATCH] Remove world upgrade executors
|
||||
|
||||
License: AGPL-3.0 (https://www.gnu.org/licenses/agpl-3.0.html)
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||
index 95cac7edae8ac64811fc6a2f6b97dd4a0fceb0b0..29a33ec067b9f47a7a86cce90316e1837d7d8612 100644
|
||||
--- a/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||
+++ b/src/main/java/io/papermc/paper/world/ThreadedWorldUpgrader.java
|
||||
@@ -18,6 +18,8 @@ import net.minecraft.world.level.storage.DimensionDataStorage;
|
||||
import net.minecraft.world.level.storage.LevelStorageSource;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
+import org.galemc.gale.concurrent.AsyncExecutor;
|
||||
+
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.DecimalFormat;
|
||||
@@ -46,6 +48,10 @@ public class ThreadedWorldUpgrader {
|
||||
this.dimensionType = dimensionType;
|
||||
this.worldName = worldName;
|
||||
this.worldDir = worldDir;
|
||||
+ // Gale start - centralized async execution - remove world upgrade executors
|
||||
+ this.threadPool = AsyncExecutor.instance;
|
||||
+ /*
|
||||
+ // Gale end - centralized async execution - remove world upgrade executors
|
||||
this.threadPool = Executors.newFixedThreadPool(Math.max(1, threads), new ThreadFactory() {
|
||||
private final AtomicInteger threadCounter = new AtomicInteger();
|
||||
|
||||
@@ -61,6 +67,7 @@ public class ThreadedWorldUpgrader {
|
||||
return ret;
|
||||
}
|
||||
});
|
||||
+ */ // Gale - centralized async execution - remove world upgrade executors
|
||||
this.dataFixer = dataFixer;
|
||||
this.generatorKey = generatorKey;
|
||||
this.removeCaches = removeCaches;
|
||||
Reference in New Issue
Block a user