Comment cleanup

This commit is contained in:
2024-04-26 15:00:03 -04:00
parent 9348852e2c
commit c2152432ce
+5 -6
View File
@@ -30,13 +30,10 @@ import java.util.regex.Pattern;
public class MessageDispatcher implements Runnable {
// Instance variables
// Class variables
private static final ConcurrentLinkedQueue<Dispatch>[] _messageQueue = new ConcurrentLinkedQueue[DispatchChannel.values().length];
private static final LinkedBlockingQueue<Boolean> _blockingQueue = new LinkedBlockingQueue<>();
// Class variables
public static volatile long[] messageCount = new long[DispatchChannel.values().length];
public static LongAdder[] dispatchCount = new LongAdder[DispatchChannel.values().length];
@@ -47,8 +44,6 @@ public class MessageDispatcher implements Runnable {
private final Pattern filterPattern; // Unused, but just in case
private Dispatch messageDispatch;
// Thread constructor
public MessageDispatcher() {
// Create new FIFO queues for this network thread
@@ -94,6 +89,10 @@ public class MessageDispatcher implements Runnable {
public static void send(Dispatch messageDispatch, DispatchChannel dispatchChannel) {
// A Dispatch should be borrowed from the local cache.
// They will automatically be released back to the queue
// once delivered.
// Don't queue up empty dispatches!
if (messageDispatch.player == null)