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 |
---|---|
Geo::RingBuffer::ReadContext | Write context type, which allows efficient and safe reading. |
Geo::RingBuffer::WriteContext | Write context type, which allows efficient and safe writing. |
Functions
Name | Description |
---|---|
GetMaxBlockedDurationTicks() | Return the maximum duration that the writing thread was blocked due to the buffer being full. |
GetNumBlockedWrites() | Return the number of recorded blocked writes. |
HasData() | Do we have any data to read? |
NonCopyable(NonCopyable &&) | Defaulted to allow move. |
operator=(NonCopyable &&) | Defaulted to allow move. |
RecordBlockedDuration(s64) | Record that the writing thread was blocked due to the buffer being full. |
ResetBlockedWritesCounter() | Reset the counters which keep track of # of times buffer writes are blocked. |
RingBuffer(u32, const u32) | Construct a new ring buffer with the given size and maximum allocation alignment. |
Write(T &&) | Helper function to write an object to the buffer. |
Anchor | ||||
---|---|---|---|---|
|
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.
Anchor | ||||
---|---|---|---|---|
|
Geo::s32 Geo::RingBuffer::GetNumBlockedWrites
...
public: Geo::s32 GetNumBlockedWrites() const
...
Return the number of recorded blocked writes.
Anchor | ||||
---|---|---|---|---|
|
bool Geo::RingBuffer::HasData
...
public: bool HasData() const
...
Do we have any data to read?
Anchor | ||||
---|---|---|---|---|
|
Geo::NonCopyable::NonCopyable
...
public: NonCopyable
(
NonCopyable &&
)
...
Defaulted to allow move.
Anchor | ||||
---|---|---|---|---|
|
NonCopyable& Geo::NonCopyable::operator=
...
public: NonCopyable & operator=
(
NonCopyable &&
)
...
Defaulted to allow move.
Anchor | ||||
---|---|---|---|---|
|
void Geo::RingBuffer::RecordBlockedDuration
...
public: void RecordBlockedDuration
(
s64 durationTicks
)
...
Record that the writing thread was blocked due to the buffer being full.
Anchor | ||||
---|---|---|---|---|
|
void Geo::RingBuffer::ResetBlockedWritesCounter
...
public: void ResetBlockedWritesCounter()
...
Reset the counters which keep track of # of times buffer writes are blocked.
Anchor | ||||
---|---|---|---|---|
|
Geo::RingBuffer::RingBuffer
...
public: RingBuffer
(
u32 size,
const u32 maxAlignment
)
...
Construct a new ring buffer with the given size and maximum allocation alignment.
Size must
...
Anchor | ||||
---|---|---|---|---|
|
void Geo::RingBuffer::Write
...
public: void Write
(
T && data
)
...
Helper function to write an object to the buffer.
Not necessarily the most efficient way, as it uses the default alignment of the buffer.