Attention
This functionality is only available in the C++ toolkits. For other languages, we recommend using language-specific functionality instead.
OEBoundedBuffer¶
template<class T>
class OEBoundedBuffer
First-in-first-out (FIFO) queue that only allows for maxsize
items to be stored in the buffer, hence, “bounded”. It is not
inherently thread safe by itself. Use this in conjunction with a
OEProtectedBuffer to make a thread-safe queue.
Constructors¶
OEBoundedBuffer(oesize_t maxsize)
Determines the maximum number of elements this queue can
hold. The maxsize
parameter should be a power-of-2 to allow
for a more efficient implementation.
Peek¶
T Peek()
Returns the item that will be returned by the next call to
OEBoundedBuffer::Get
, but does not remove
it from the queue.