On Jan 12, 2008, at 3:30 PM, Matthew Toseland wrote:
> Probably better to have separate queues, maybe an array of queues.

So long as the priority is strict that would make it faster to enqueue  
items, but not dequeue. In this implementation they are already lined  
up in send order. In fact, I think that it would be a much better  
optimization to only remove 'x' bytes from the send queue:

public MessageItem[] grabQueuedMessageItems(long  
oneMessageMoreThanThisBytes);

That would also remove (or help?) the rather odd race condition of  
packets requeued while the transmitter is holding all the packets.

--
Robert Hailey

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20080115/acc0650f/attachment.html>

Reply via email to