mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-22 08:19:19 +00:00
update spark thread names
This commit is contained in:
@@ -10,6 +10,7 @@ import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import org.bxteam.divinemc.config.DivineConfig;
|
||||
import org.bxteam.divinemc.spark.ThreadDumperRegistry;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -33,7 +34,7 @@ public class CullTask implements Runnable {
|
||||
private final Vec3d aabbMax = new Vec3d(0, 0, 0);
|
||||
|
||||
private static final Executor backgroundWorker = Executors.newCachedThreadPool(task -> {
|
||||
final TickThread worker = new TickThread("EntityCulling") {
|
||||
final TickThread worker = new TickThread("Raytrace Entity Tracker Thread") {
|
||||
@Override
|
||||
public void run() {
|
||||
task.run();
|
||||
@@ -41,6 +42,7 @@ public class CullTask implements Runnable {
|
||||
};
|
||||
|
||||
worker.setDaemon(true);
|
||||
ThreadDumperRegistry.REGISTRY.add(worker.getName());
|
||||
|
||||
return worker;
|
||||
});
|
||||
|
||||
@@ -9,12 +9,12 @@ public class ServerLevelTickExecutorThreadFactory implements ThreadFactory {
|
||||
|
||||
public ServerLevelTickExecutorThreadFactory(String worldName) {
|
||||
this.worldName = worldName;
|
||||
ThreadDumperRegistry.REGISTRY.add("serverlevel-tick-worker [" + worldName + "]");
|
||||
ThreadDumperRegistry.REGISTRY.add(worldName + "ServerLevel Tick Worker");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Thread newThread(Runnable runnable) {
|
||||
TickThread.ServerLevelTickThread tickThread = new TickThread.ServerLevelTickThread(runnable, "serverlevel-tick-worker [" + worldName + "]");
|
||||
TickThread.ServerLevelTickThread tickThread = new TickThread.ServerLevelTickThread(runnable, this.worldName + "ServerLevel Tick Worker");
|
||||
|
||||
if (tickThread.isDaemon()) {
|
||||
tickThread.setDaemon(false);
|
||||
|
||||
@@ -3,6 +3,7 @@ package org.bxteam.divinemc.util;
|
||||
import ca.spottedleaf.moonrise.common.util.TickThread;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bxteam.divinemc.spark.ThreadDumperRegistry;
|
||||
import java.util.concurrent.BlockingQueue;
|
||||
import java.util.concurrent.LinkedBlockingQueue;
|
||||
|
||||
@@ -31,6 +32,7 @@ public class AsyncProcessor {
|
||||
}
|
||||
}, threadName);
|
||||
|
||||
ThreadDumperRegistry.REGISTRY.add(threadName);
|
||||
this.workerThread.start();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user