This is the documentation for Enlighten.
class Geo RingBuffer
class Geo::RingBuffer
Ring Buffer class.
Stores values of any type in a fixed length buffer. Thread safe for single writer single reader only.
Classes
Name | Description |
|---|---|
Write context type, which allows efficient and safe reading. | |
Write context type, which allows efficient and safe writing. |
Functions
Name | Description |
|---|---|
Return the maximum duration that the writing thread was blocked due to the buffer being full. | |
Return the number of recorded blocked writes. | |
Do we have any data to read? | |
Record that the writing thread was blocked due to the buffer being full. | |
Reset the counters which keep track of # of times buffer writes are blocked. | |
Construct a new ring buffer with the given size and maximum allocation alignment. | |
Helper function to write an object to the buffer. |
Geo::s64 Geo::RingBuffer::GetMaxBlockedDurationTicks
public: Geo::s64 GetMaxBlockedDurationTicks() const
Return the maximum duration that the writing thread was blocked due to the buffer being full.
Geo::s32 Geo::RingBuffer::GetNumBlockedWrites
public: Geo::s32 GetNumBlockedWrites() const
Return the number of recorded blocked writes.
bool Geo::RingBuffer::HasData
public: bool HasData() const
Do we have any data to read?
void Geo::RingBuffer::RecordBlockedDuration
public: void RecordBlockedDuration
(
s64 durationTicks
)
Record that the writing thread was blocked due to the buffer being full.