Contents

class

SushiEngine::Logging::SpscByteRing

Queues variable-length records between exactly one writer and one reader thread.

Declared in
engine/foundation/logging/include/SushiEngine/logging/spsc_byte_ring.hpp

Public Methods

SpscByteRing

Allocates the ring once, clamping capacity_bytes to a power of two of at least 256 bytes.

try_write

Appends one record made of head then body, or refuses it whole.

peek_size

Returns the size of the oldest record, or 0 when the ring is empty.

read

Copies the oldest record into destination and removes it.

capacity

Returns the ring's clamped capacity in bytes.