mirror of
https://github.com/Minestom/Minestom.git
synced 2024-11-02 17:00:41 +01:00
Use single thread by default
This commit is contained in:
parent
79d936936e
commit
495164d03b
@ -8,7 +8,7 @@ import net.minestom.server.instance.InstanceManager;
|
||||
import net.minestom.server.monitoring.TickMonitor;
|
||||
import net.minestom.server.network.ConnectionManager;
|
||||
import net.minestom.server.network.player.NettyPlayerConnection;
|
||||
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;
|
||||
@ -31,19 +31,13 @@ public final class UpdateManager {
|
||||
|
||||
private volatile boolean stopRequested;
|
||||
|
||||
private ThreadProvider threadProvider;
|
||||
// TODO make configurable
|
||||
private ThreadProvider threadProvider = new SingleThreadProvider();
|
||||
|
||||
private final Queue<LongConsumer> tickStartCallbacks = Queues.newConcurrentLinkedQueue();
|
||||
private final Queue<LongConsumer> tickEndCallbacks = Queues.newConcurrentLinkedQueue();
|
||||
private final List<Consumer<TickMonitor>> tickMonitors = new CopyOnWriteArrayList<>();
|
||||
|
||||
{
|
||||
// DEFAULT THREAD PROVIDER
|
||||
threadProvider = new PerInstanceThreadProvider();
|
||||
//threadProvider = new PerChunkThreadProvider();
|
||||
//threadProvider = new SingleThreadProvider();
|
||||
}
|
||||
|
||||
/**
|
||||
* Should only be created in MinecraftServer.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user