1
0
mirror of https://github.com/deavmi/birchwood synced 2024-09-20 13:22:52 +02:00
- Added missing documentation
- Removed commented-out code block

Sender

- Added missing documentation
- Removed commented-out code block
This commit is contained in:
Tristan B. Velloza Kildaire 2023-03-18 11:07:37 +02:00
parent a1b739e8b7
commit fc63aaae49
2 changed files with 17 additions and 13 deletions

View File

@ -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;
// }
}

View File

@ -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;
// }
}