3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 00:23:03 +01:00

Merge pull request #39 from LoudSoftware/add-general-thread-pool-in-config

Add general thread pool in config
Dieser Commit ist enthalten in:
EOT3000 2019-09-22 18:24:21 -04:00 committet von GitHub
Commit edfde58799
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
3 geänderte Dateien mit 11 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -99,18 +99,14 @@ public class GeyserConnector implements Connector {
long startupTime = System.currentTimeMillis(); long startupTime = System.currentTimeMillis();
// Metric // Metric
if(!(System.console() == null) && System.getProperty("os.name", "Windows 10").toLowerCase().contains("windows")) { if (!(System.console() == null) && System.getProperty("os.name", "Windows 10").toLowerCase().contains("windows")) {
AnsiConsole.systemInstall(); AnsiConsole.systemInstall();
} }
instance = this; instance = this;
this.generalThreadPool = Executors.newScheduledThreadPool(32); //TODO: Make configurable value
this.logger = GeyserLogger.DEFAULT; this.logger = GeyserLogger.DEFAULT;
ConsoleCommandReader consoleReader = new ConsoleCommandReader(this);
consoleReader.startConsole();
logger.info("******************************************"); logger.info("******************************************");
logger.info(""); logger.info("");
logger.info("Loading " + NAME + " vesion " + VERSION); logger.info("Loading " + NAME + " vesion " + VERSION);
@ -126,6 +122,10 @@ public class GeyserConnector implements Connector {
shutdown(); shutdown();
} }
this.generalThreadPool = Executors.newScheduledThreadPool(config.getGeneralThreadPool());
ConsoleCommandReader consoleReader = new ConsoleCommandReader(this);
consoleReader.startConsole();
logger.setDebug(config.isDebugMode()); logger.setDebug(config.isDebugMode());
Toolbox.CACHED_PALLETE.array(); Toolbox.CACHED_PALLETE.array();

Datei anzeigen

@ -47,5 +47,8 @@ public class GeyserConfiguration {
@JsonProperty("debug-mode") @JsonProperty("debug-mode")
private boolean debugMode; private boolean debugMode;
@JsonProperty("general-thread-pool")
private int generalThreadPool;
private MetricInfo metrics; private MetricInfo metrics;
} }

Datei anzeigen

@ -46,6 +46,9 @@ max-players: 100
# If debug messages should be sent through console # If debug messages should be sent through console
debug-mode: false debug-mode: false
# Thread pool size
general-thread-pool: 32
# bStats is a stat tracker that is entirely anonymous and tracks only basic information # bStats is a stat tracker that is entirely anonymous and tracks only basic information
# about Geyser, such as how many people are online, how many servers are using Geyser, # about Geyser, such as how many people are online, how many servers are using Geyser,
# what OS is being used, etc. You can learn more about bStats here: https://bstats.org/. # what OS is being used, etc. You can learn more about bStats here: https://bstats.org/.