mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-11 18:26:11 +00:00
Way to tired
This commit is contained in:
@@ -102,7 +102,7 @@ public class IrisEngineSVC implements IrisService {
|
||||
Engine engine = supplier.get();
|
||||
if (engine != null) {
|
||||
long unloadStart = System.currentTimeMillis();
|
||||
int count = engine.getMantle().unloadTectonicPlate();
|
||||
int count = engine.getMantle().unloadTectonicPlate(tectonicLimit.get());
|
||||
if (count > 0) {
|
||||
Iris.info(C.GOLD + "Unloaded " + C.YELLOW + count + " TectonicPlates in " + C.RED + Form.duration(System.currentTimeMillis() - unloadStart, 2));
|
||||
}
|
||||
|
||||
@@ -178,8 +178,8 @@ public interface EngineMantle extends IObjectPlacer {
|
||||
default void trim(int limit) {
|
||||
getMantle().trim(TimeUnit.SECONDS.toMillis(IrisSettings.get().getPerformance().getMantleKeepAlive()), limit);
|
||||
}
|
||||
default int unloadTectonicPlate(){
|
||||
return getMantle().unloadTectonicPlate();
|
||||
default int unloadTectonicPlate(int tectonicLimit){
|
||||
return getMantle().unloadTectonicPlate(tectonicLimit);
|
||||
}
|
||||
|
||||
default MultiBurst burst() {
|
||||
|
||||
@@ -445,7 +445,11 @@ public class Mantle {
|
||||
}
|
||||
}
|
||||
|
||||
public int unloadTectonicPlate() {
|
||||
public int unloadTectonicPlate(int tectonicLimit) {
|
||||
// todo: make a advanced unloader
|
||||
if (toUnload.size() > tectonicLimit){
|
||||
dynamicThreads.set(2);
|
||||
}
|
||||
AtomicInteger i = new AtomicInteger();
|
||||
unloadLock.lock();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user