refactor(cell): change PacketQueue::dequeue to dequeue_at(ts) - #198
Conversation
|
This shall never be an optional argument. And please rename the interface from For simple queues, they can just ignore the value (but we shall still pass the actual value from the cell), as they do not require it. But the semantics of this interface should be fixed to: the cell wants to dequeue a packet at the timestamp, as in our design philosophy, the queue is a passive-driven component. |
…nt timestamp parameter
|
Wait for extra two approvals (from @Centaurus99 , @un-lock-able or @Lethe10137 ) to merge this. |
|
In addition, please squash the changes into a single commit and update the PR title accordingly. @CepheusC |
We could squash ourselves when merging, so he doesn't need to worry about that and you can have a clear history to review changes. Also, we should try to compact the head into 50 characters instead of spliting into two lines. |
Summary
Add an
Option<Instant>timestamp parameter toPacketQueue::dequeue()to support time-aware queue operations. TheCoDelqueue uses this parameter to avoidInstant::now()calls, while simple queue implementations (DropHead, DropTail,Infinite) ignore it with
None.Usage
This change lays the groundwork for PR #197 (redpie branch) by providing the necessary timestamp plumbing in the
PacketQueuetrait. The subsequent PR will make use of this parameter to implement its feature.