Update and hopefully fix the persisting issue
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2023-06-17 17:13:46 +02:00
Ursprung a950640aae
Commit b52283afa3
2 geänderte Dateien mit 5 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bausystem;
import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.bausystem.configplayer.Config;
import de.steamwar.bausystem.features.world.RamUsage;
import de.steamwar.bausystem.region.loader.PrototypeLoader;
import de.steamwar.bausystem.region.loader.RegionLoader;
import de.steamwar.bausystem.region.loader.Updater;
@ -73,6 +74,7 @@ public class BauSystem extends JavaPlugin implements Listener {
new Updater(RegionLoader.file, RegionLoader::load);
LinkageUtils.link();
RamUsage.init();
// This could disable any watchdog stuff. We need to investigate if this is a problem.
/*

Datei anzeigen

@ -22,6 +22,7 @@ package de.steamwar.bausystem.features.world;
import lombok.experimental.UtilityClass;
import java.io.*;
import java.util.concurrent.locks.LockSupport;
@UtilityClass
public class RamUsage {
@ -48,11 +49,8 @@ public class RamUsage {
usage = _getUsage();
load = _getLoad();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
Thread.yield();
LockSupport.parkNanos(1000000000L);
}
});
thread.setDaemon(true);