PendingPacketQueue struct

Lock-free MPSC queue for PendingPacket.

Worker threads call Push(); Sentinel drains via Drain() after all build jobs complete. Drain reverses the intrusive list to restore dispatch order.

Public types

struct Node

Constructors, destructors, conversion operators

PendingPacketQueue() defaulted
PendingPacketQueue(const PendingPacketQueue&) deleted
~PendingPacketQueue()
Frees packets that were pushed but never drained (e.g. client dropped mid-frame).

Public functions

auto operator=(const PendingPacketQueue&) -> PendingPacketQueue& deleted
void Push(PendingPacket&& pkt)
void Drain(std::vector<PendingPacket>& out)
Drain all pending packets into out in dispatch order.
auto IsEmpty() const -> bool

Function documentation

void PendingPacketQueue::Drain(std::vector<PendingPacket>& out)

Drain all pending packets into out in dispatch order.

Parameters
out out Receives packets in the order they were pushed.