mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 00:17:58 +01:00
Add tick scheduler to BenchmarkManager
This commit is contained in:
parent
c24cc07b7c
commit
8e9838c6b6
@ -74,6 +74,7 @@ public final class MinecraftServer {
|
||||
// Threads
|
||||
public static final String THREAD_NAME_BENCHMARK = "Ms-Benchmark";
|
||||
|
||||
public static final String THREAD_NAME_TICK_SCHEDULER = "Ms-TickScheduler";
|
||||
public static final String THREAD_NAME_TICK = "Ms-Tick";
|
||||
|
||||
public static final String THREAD_NAME_BLOCK_BATCH = "Ms-BlockBatchPool";
|
||||
|
@ -1,16 +1,14 @@
|
||||
package net.minestom.server;
|
||||
|
||||
import com.google.common.collect.Queues;
|
||||
import net.minestom.server.entity.acquirable.Acquisition;
|
||||
import net.minestom.server.instance.Chunk;
|
||||
import net.minestom.server.instance.Instance;
|
||||
import net.minestom.server.instance.InstanceManager;
|
||||
import net.minestom.server.entity.acquirable.Acquisition;
|
||||
import net.minestom.server.monitoring.TickMonitor;
|
||||
import net.minestom.server.network.ConnectionManager;
|
||||
import net.minestom.server.network.player.NettyPlayerConnection;
|
||||
import net.minestom.server.thread.PerChunkThreadProvider;
|
||||
import net.minestom.server.thread.PerInstanceThreadProvider;
|
||||
import net.minestom.server.thread.SingleThreadProvider;
|
||||
import net.minestom.server.thread.ThreadProvider;
|
||||
import net.minestom.server.utils.async.AsyncUtils;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@ -29,7 +27,7 @@ import java.util.function.LongConsumer;
|
||||
public final class UpdateManager {
|
||||
|
||||
private final ScheduledExecutorService updateExecutionService = Executors.newSingleThreadScheduledExecutor(r ->
|
||||
new Thread(r, "tick-scheduler"));
|
||||
new Thread(r, MinecraftServer.THREAD_NAME_TICK_SCHEDULER));
|
||||
|
||||
private volatile boolean stopRequested;
|
||||
|
||||
|
@ -41,6 +41,7 @@ public final class BenchmarkManager {
|
||||
|
||||
THREADS.add(THREAD_NAME_BLOCK_BATCH);
|
||||
THREADS.add(THREAD_NAME_SCHEDULER);
|
||||
THREADS.add(THREAD_NAME_TICK_SCHEDULER);
|
||||
THREADS.add(THREAD_NAME_TICK);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user