diff --git a/source/birchwood/client/receiver.d b/source/birchwood/client/receiver.d index 2b73c16..87e92b2 100644 --- a/source/birchwood/client/receiver.d +++ b/source/birchwood/client/receiver.d @@ -15,13 +15,18 @@ import birchwood.client; import birchwood.protocol.messages : Message, decodeMessage; import std.string : indexOf; import birchwood.client.events : PongEvent, IRCEvent; +import std.string : cmp; public final class ReceiverThread : Thread { /** - * The receive queue and its lock + * The receive queue */ private SList!(ubyte[]) recvQueue; + + /** + * The receive queue's lock + */ private Mutex recvQueueLock; /** @@ -151,7 +156,6 @@ public final class ReceiverThread : Thread Message pingMessage; foreach(Message curMsg; currentMessageQueue[]) { - import std.string : cmp; if(cmp(curMsg.getCommand(), "PING") == 0) { currentMessageQueue.linearRemoveElement(curMsg); @@ -221,15 +225,13 @@ public final class ReceiverThread : Thread } } + /** + * Stops the receive queue manager + */ public void end() { // TODO: See above notes about libsnooze behaviour due // ... to usage in our context receiveEvent.notifyAll(); } - - // public bool isReady() - // { - // return hasEnsured; - // } } \ No newline at end of file diff --git a/source/birchwood/client/sender.d b/source/birchwood/client/sender.d index 3e70f90..124526e 100644 --- a/source/birchwood/client/sender.d +++ b/source/birchwood/client/sender.d @@ -14,9 +14,13 @@ import birchwood.client; public final class SenderThread : Thread { /** - * The send queue and its lock + * The send queue */ private SList!(ubyte[]) sendQueue; + + /** + * The send queue's lock + */ private Mutex sendQueueLock; /** @@ -130,15 +134,13 @@ public final class SenderThread : Thread } } + /** + * Stops the send queue manager + */ public void end() { // TODO: See above notes about libsnooze behaviour due // ... to usage in our context sendEvent.notifyAll(); } - - // public bool isReady() - // { - // return hasEnsured; - // } } \ No newline at end of file