mcx::utils::SpmcBuffer

mcx::utils::SpmcBuffer

More…

Protected Classes

Name
struct Cell

Public Functions

Name
SpmcBuffer()
virtual ~SpmcBuffer()
void write(const T & in)
constexpr uint32_t size()
uint32_t read(T * out) const
uint32_t pos() const

Protected Attributes

Name
Cell *const buffer_
std::atomic< uint32_t > enqueue_pos_

Detailed Description

template <typename T >
class mcx::utils::SpmcBuffer;

Public Functions Documentation

function SpmcBuffer

inline SpmcBuffer()

function ~SpmcBuffer

inline virtual ~SpmcBuffer()

function write

inline void write(
    const T & in
)

function size

inline constexpr uint32_t size()

function read

inline uint32_t read(
    T * out
) const

function pos

inline uint32_t pos() const

Protected Attributes Documentation

variable buffer_

Cell *const buffer_;

variable enqueue_pos_

std::atomic< uint32_t > enqueue_pos_ {};

Updated on 2022-04-05 at 16:21:27 +0200