Contents

SushiEngine::Logging::SpscByteRing

try_write

bool try_write(const void *head, std::size_t head_size, const void *body, std::size_t body_size) noexcept

Parameters

NameType
headconst void *
head_sizestd::size_t
bodyconst void *
body_sizestd::size_t

Returns

bool

false when the record is empty, exceeds UINT32_MAX, or does not fit; nothing is written then.

Description

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

Precondition

Called only from the producer thread.