Direct-BT v3.3.0-1-gc2d430c
Direct-BT - Direct Bluetooth Programming.
|
Ring buffer implementation, a.k.a circular buffer, exposing lock-free get*(..)
and put*(..)
methods.
More...
#include <ringbuffer.hpp>
Public Types | |
typedef jau::callocator< Value_type > | allocator_type |
typedef const value_type * | const_pointer |
typedef const value_type & | const_reference |
typedef std::make_signed< size_type >::type | difference_type |
typedef value_type * | pointer |
typedef value_type & | reference |
typedef Size_type | size_type |
typedef Value_type | value_type |
Public Member Functions | |
ringbuffer (const ringbuffer &_source) noexcept | |
ringbuffer (const Size_type capacity) noexcept | |
Create an empty ring buffer instance w/ the given net capacity . More... | |
ringbuffer (const std::vector< Value_type > ©From) noexcept | |
Create a full ring buffer instance w/ the given array's net capacity and content. More... | |
ringbuffer (const Value_type *copyFrom, const Size_type copyFromSize) noexcept | |
ringbuffer (ringbuffer &&o) noexcept=default | |
~ringbuffer () noexcept | |
Size_type | capacity () const noexcept |
Returns the net capacity of this ring buffer. More... | |
void | clear (const bool zeromem=false) noexcept |
Releasing all elements available, i.e. More... | |
void | close (const bool zeromem=false) noexcept |
Close this ringbuffer by releasing all elements available and resizing capacity to zero. More... | |
Size_type | drop (const Size_type max_count) noexcept |
Drops up to max_count oldest enqueued elements, but may drop less if not available. More... | |
bool | dropBlocking (const Size_type count, const fraction_i64 &timeout) noexcept |
Drops exactly count oldest enqueued elements, will block until they become available. More... | |
bool | dropBlocking (const Size_type count, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Drops exactly count oldest enqueued elements, will block until they become available. More... | |
void | dump (FILE *stream, const std::string &prefix) const noexcept |
Debug functionality - Dumps the contents of the internal array. More... | |
Size_type | freeSlots () const noexcept |
Returns the number of free slots available to put. More... | |
bool | get (Value_type &result) noexcept |
Dequeues the oldest enqueued element, if available. More... | |
Size_type | get (Value_type *dest, const Size_type dest_len, const Size_type min_count) noexcept |
Dequeues the oldest enqueued min(dest_len, size()>=min_count) elements by copying them into the given consecutive 'dest' storage. More... | |
std::string | get_info () const noexcept |
bool | getBlocking (Value_type &result, const fraction_i64 &timeout) noexcept |
Dequeues the oldest enqueued element. More... | |
bool | getBlocking (Value_type &result, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Dequeues the oldest enqueued element. More... | |
Size_type | getBlocking (Value_type *dest, const Size_type dest_len, const Size_type min_count, const fraction_i64 &timeout) noexcept |
Dequeues the oldest enqueued min(dest_len, size()>=min_count) elements by copying them into the given consecutive 'dest' storage. More... | |
Size_type | getBlocking (Value_type *dest, const Size_type dest_len, const Size_type min_count, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Dequeues the oldest enqueued min(dest_len, size()>=min_count) elements by copying them into the given consecutive 'dest' storage. More... | |
constexpr bool | getMultiPCEnabled () const |
Return whether multiple producer and consumer are enabled, see ringbuffer_multi_pc and ringbuffer_single_pc. More... | |
void | interruptReader () noexcept |
Interrupt a potentially blocked reader once. More... | |
void | interruptWriter () noexcept |
Interrupt a potentially blocked writer once. More... | |
bool | isEmpty () const noexcept |
Returns true if this ring buffer is empty, otherwise false. More... | |
bool | isFull () const noexcept |
Returns true if this ring buffer is full, otherwise false. More... | |
ringbuffer & | operator= (const ringbuffer &_source) noexcept |
ringbuffer & | operator= (ringbuffer &&o) noexcept=default |
bool | peek (Value_type &result) noexcept |
Peeks the next element at the read position w/o modifying pointer, nor blocking. More... | |
bool | peekBlocking (Value_type &result, const fraction_i64 &timeout) noexcept |
Peeks the next element at the read position w/o modifying pointer, but with blocking. More... | |
bool | peekBlocking (Value_type &result, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Peeks the next element at the read position w/o modifying pointer, but with blocking. More... | |
bool | put (const Value_type &e) noexcept |
Enqueues the given element by copying it into this ringbuffer storage. More... | |
bool | put (const Value_type *first, const Value_type *last) noexcept |
Enqueues the given range of consecutive elements by copying it into this ringbuffer storage. More... | |
bool | put (Value_type &&e) noexcept |
Enqueues the given element by moving it into this ringbuffer storage. More... | |
bool | putBlocking (const Value_type &e, const fraction_i64 &timeout) noexcept |
Enqueues the given element by copying it into this ringbuffer storage. More... | |
bool | putBlocking (const Value_type &e, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Enqueues the given element by copying it into this ringbuffer storage. More... | |
bool | putBlocking (const Value_type *first, const Value_type *last, const fraction_i64 &timeout) noexcept |
Enqueues the given range of consecutive elementa by copying it into this ringbuffer storage. More... | |
bool | putBlocking (const Value_type *first, const Value_type *last, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Enqueues the given range of consecutive elementa by copying it into this ringbuffer storage. More... | |
bool | putBlocking (Value_type &&e, const fraction_i64 &timeout) noexcept |
Enqueues the given element by moving it into this ringbuffer storage. More... | |
bool | putBlocking (Value_type &&e, const fraction_i64 &timeout, bool &timeout_occurred) noexcept |
Enqueues the given element by moving it into this ringbuffer storage. More... | |
void | recapacity (const Size_type newCapacity) |
Resizes this ring buffer's capacity. More... | |
void | reset (const std::vector< Value_type > ©From) noexcept |
Clears all elements and add all copyFrom elements thereafter, as if reconstructing this ringbuffer instance. More... | |
void | reset (const Value_type *copyFrom, const Size_type copyFromCount) noexcept |
Clears all elements and add all copyFrom elements thereafter, as if reconstructing this ringbuffer instance. More... | |
void | set_end_of_input (const bool v=true) noexcept |
Set End of Input from writer thread, unblocking all read-operations and a potentially currently blocked reader thread. More... | |
constexpr_non_literal_var void | setMultiPCEnabled (const bool v) |
Enable or disable capability to handle multiple producer and consumer, see ringbuffer_multi_pc and ringbuffer_single_pc. More... | |
Size_type | size () const noexcept |
Returns the number of elements in this ring buffer. More... | |
std::string | toString () const noexcept |
Returns a short string representation incl. More... | |
Size_type | waitForElements (const Size_type min_count, const fraction_i64 &timeout, bool &timeout_occured) noexcept |
Blocks until at least count elements have been put for subsequent get() and getBlocking(). More... | |
Size_type | waitForFreeSlots (const Size_type min_count, const fraction_i64 &timeout, bool &timeout_occured) noexcept |
Blocks until at least count free slots become available for subsequent put() and putBlocking(). More... | |
Static Public Attributes | |
static constexpr const bool | uses_memcpy = use_memcpy |
static constexpr const bool | uses_memmove = use_memmove |
static constexpr const bool | uses_secmem = use_secmem |
Ring buffer implementation, a.k.a circular buffer, exposing lock-free get*(..)
and put*(..)
methods.
This data structure is also supporting Concurrency.
Implementation utilizes the Always Keep One Slot Open, hence implementation maintains an internal array of capacity
plus one!
Empty | writePos == readPos | size == 0 |
Full | writePos == readPos - 1 | size == capacity |
Empty [RW][][ ][ ][ ][ ][ ][ ] ; W==R Avail [ ][ ][R][.][.][.][.][W] ; W > R Avail [.][.][.][W][ ][ ][R][.] ; W < R - 1 Full [.][.][.][.][.][W][R][.] ; W==R-1
Thread safety is guaranteed, considering the mode of operation as described below.
Expects one producer-thread at a time and one consumer-thread at a time concurrently. Threads can be different or the same.
This is the default mode with the least std::mutex operations.
See setMultiPCEnabled().
Implementation is thread safe if:
put*(..)
operations from one producer-thread at a time.get*(..)
operations from one consumer-thread at a time.put*(..)
producer and get*(..)
consumer threads can be different or the same.Expects multiple producer-threads and multiple consumer-threads concurrently. Threads can be different or the same.
This operation mode utilizes a specific multi-producer and -consumer lock, synchronizing put*(..)
and get*(..)
operations separately.
Use setMultiPCEnabled() to enable or disable multiple producer and consumer mode.
Implementation is thread safe if:
put*(..)
operations concurrently from multiple threads.get*(..)
operations concurrently from multiple threads.put*(..)
producer and get*(..)
consumer threads can be different or the same.To allow an application to unblock a potentially blocked producer (writer) or consumer (reader) thread once, one can call interruptWriter() or interruptReader() respectively.
To allow an application to mark the end of input stream, i.e. the producer (write) has completed filling the ringbuffer, one can call set_end_of_input().
Calling set_end_of_input(true) will unblock all read-operations from this point onwards. A potentially currently blocked reader thread is also interrupted and hence unblocked.
See darray_ntt_params.
use_memmove
see darray_memmove.
use_memcpy
has more strict requirements than use_memmove
, i.e. strictly relies on Value_type being std::is_trivially_copyable_v<Value_type>
.
It allows to merely use memory operations w/o the need for constructor or destructor.
See Trivial destructor being key requirement to TriviallyCopyable.
A trivial destructor is a destructor that performs no action. Objects with trivial destructors don't require a delete-expression and may be disposed of by simply deallocating their storage. All data types compatible with the C language (POD types) are trivially destructible.`
use_secmem
see darray_secmem.
Definition at line 182 of file ringbuffer.hpp.
typedef Value_type jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::value_type |
Definition at line 190 of file ringbuffer.hpp.
typedef value_type* jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::pointer |
Definition at line 191 of file ringbuffer.hpp.
typedef const value_type* jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::const_pointer |
Definition at line 192 of file ringbuffer.hpp.
typedef value_type& jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::reference |
Definition at line 193 of file ringbuffer.hpp.
typedef const value_type& jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::const_reference |
Definition at line 194 of file ringbuffer.hpp.
typedef Size_type jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::size_type |
Definition at line 195 of file ringbuffer.hpp.
typedef std::make_signed<size_type>::type jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::difference_type |
Definition at line 196 of file ringbuffer.hpp.
typedef jau::callocator<Value_type> jau::ringbuffer< Value_type, Size_type, use_memmove, use_memcpy, use_secmem >::allocator_type |
Definition at line 198 of file ringbuffer.hpp.
|
inlinenoexcept |
Create a full ring buffer instance w/ the given array's net capacity and content.
Example for a 10 element Integer array:
Integer[] source = new Integer[10]; // fill source with content .. ringbuffer<Integer> rb = new ringbuffer<Integer>(source);
isFull()
returns true on the newly created full ring buffer.
Implementation will allocate an internal array with size of array copyFrom
plus one, and copy all elements from array copyFrom
into the internal array.
copyFrom | mandatory source array determining ring buffer's net capacity() and initial content. |
IllegalArgumentException | if copyFrom is nullptr |
Definition at line 1072 of file ringbuffer.hpp.
|
inlinenoexcept |
copyFrom | |
copyFromSize |
Definition at line 1084 of file ringbuffer.hpp.
|
inlinenoexcept |
Create an empty ring buffer instance w/ the given net capacity
.
Example for a 10 element Integer array:
ringbuffer<Integer> rb = new ringbuffer<Integer>(10, Integer[].class);
isEmpty()
returns true on the newly created empty ring buffer.
Implementation will allocate an internal array of size capacity
plus one.
arrayType | the array type of the created empty internal array. |
capacity | the initial net capacity of the ring buffer |
Definition at line 1109 of file ringbuffer.hpp.
|
inlinenoexcept |
Definition at line 1116 of file ringbuffer.hpp.
|
inlinenoexcept |
Definition at line 1124 of file ringbuffer.hpp.
|
defaultnoexcept |
|
inlinenoexcept |
Returns a short string representation incl.
size/capacity and internal r/w index (impl. dependent).
Definition at line 1024 of file ringbuffer.hpp.
|
inlinenoexcept |
Debug functionality - Dumps the contents of the internal array.
Definition at line 1033 of file ringbuffer.hpp.
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 1136 of file ringbuffer.hpp.
|
defaultnoexcept |
|
inlineconstexpr |
Return whether multiple producer and consumer are enabled, see ringbuffer_multi_pc and ringbuffer_single_pc.
Defaults to false
.
Definition at line 1172 of file ringbuffer.hpp.
|
inline |
Enable or disable capability to handle multiple producer and consumer, see ringbuffer_multi_pc and ringbuffer_single_pc.
Defaults to false
.
Definition at line 1184 of file ringbuffer.hpp.
|
inlinenoexcept |
Returns the net capacity of this ring buffer.
Definition at line 1207 of file ringbuffer.hpp.
|
inlinenoexcept |
Returns the number of free slots available to put.
Definition at line 1210 of file ringbuffer.hpp.
|
inlinenoexcept |
Returns true if this ring buffer is empty, otherwise false.
Definition at line 1213 of file ringbuffer.hpp.
|
inlinenoexcept |
Returns true if this ring buffer is full, otherwise false.
Definition at line 1216 of file ringbuffer.hpp.
|
inlinenoexcept |
Returns the number of elements in this ring buffer.
Definition at line 1221 of file ringbuffer.hpp.
|
inlinenoexcept |
Blocks until at least count
elements have been put for subsequent get() and getBlocking().
min_count | minimum number of put slots |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1238 of file ringbuffer.hpp.
|
inlinenoexcept |
Blocks until at least count
free slots become available for subsequent put() and putBlocking().
min_count | minimum number of free slots |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1256 of file ringbuffer.hpp.
|
inlinenoexcept |
Releasing all elements available, i.e.
size() at the time of the call
It is the user's obligation to ensure thread safety when using ringbuffer_single_pc, as implementation can only synchronize on the blocked put() and get() std::mutex.
Assuming no concurrent put() operation, after the call:
zeromem | pass true to zero ringbuffer memory after releasing elements, otherwise non template type parameter use_secmem determines the behavior (default), see ringbuffer_ntt_params. |
Definition at line 1278 of file ringbuffer.hpp.
|
inlinenoexcept |
Close this ringbuffer by releasing all elements available and resizing capacity to zero.
Essentially causing all read and write operations to fail.
Potential writer and reader thread will be
Subsequent write and read operations will fail and not block.
After the call:
isEmpty()
will return true
size()
shall return 0
capacity()
shall return 0
freeSlots()
shall return 0
Definition at line 1322 of file ringbuffer.hpp.
|
inlinenoexcept |
Clears all elements and add all copyFrom
elements thereafter, as if reconstructing this ringbuffer instance.
It is the user's obligation to ensure thread safety when using ringbuffer_single_pc, as implementation can only synchronize on the blocked put() and get() std::mutex.
copyFrom | Mandatory array w/ length capacity() to be copied into the internal array. |
Definition at line 1362 of file ringbuffer.hpp.
|
inlinenoexcept |
Clears all elements and add all copyFrom
elements thereafter, as if reconstructing this ringbuffer instance.
It is the user's obligation to ensure thread safety when using ringbuffer_single_pc, as implementation can only synchronize on the blocked put() and get() std::mutex.
copyFrom |
Definition at line 1393 of file ringbuffer.hpp.
|
inline |
Resizes this ring buffer's capacity.
New capacity must be greater than current size.
It is the user's obligation to ensure thread safety when using ringbuffer_single_pc, as implementation can only synchronize on the blocked put() and get() std::mutex.
newCapacity |
Definition at line 1426 of file ringbuffer.hpp.
|
inlinenoexcept |
Interrupt a potentially blocked reader once.
Call this method to unblock a potentially blocked reader thread once.
Definition at line 1448 of file ringbuffer.hpp.
|
inlinenoexcept |
Set End of Input
from writer thread, unblocking all read-operations and a potentially currently blocked reader thread.
Call this method with true
after concluding writing input data will unblock all read-operations from this point onwards. A potentially currently blocked reader thread is also interrupted and hence unblocked.
Definition at line 1456 of file ringbuffer.hpp.
|
inlinenoexcept |
Interrupt a potentially blocked writer once.
Call this method to unblock a potentially blocked writer thread once.
Definition at line 1468 of file ringbuffer.hpp.
|
inlinenoexcept |
Peeks the next element at the read position w/o modifying pointer, nor blocking.
Method is non blocking and returns immediately;.
result | storage for the resulting value if successful, otherwise unchanged. |
Definition at line 1478 of file ringbuffer.hpp.
|
inlinenoexcept |
Peeks the next element at the read position w/o modifying pointer, but with blocking.
result | storage for the resulting value if successful, otherwise unchanged. |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1496 of file ringbuffer.hpp.
|
inlinenoexcept |
Peeks the next element at the read position w/o modifying pointer, but with blocking.
result | storage for the resulting value if successful, otherwise unchanged. |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1512 of file ringbuffer.hpp.
|
inlinenoexcept |
Dequeues the oldest enqueued element, if available.
The ring buffer slot will be released and its value moved to the caller's result
storage, if successful.
Method is non blocking and returns immediately;.
result | storage for the resulting value if successful, otherwise unchanged. |
Definition at line 1527 of file ringbuffer.hpp.
|
inlinenoexcept |
Dequeues the oldest enqueued element.
The ring buffer slot will be released and its value moved to the caller's result
storage, if successful.
result | storage for the resulting value if successful, otherwise unchanged. |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1547 of file ringbuffer.hpp.
|
inlinenoexcept |
Dequeues the oldest enqueued element.
The ring buffer slot will be released and its value moved to the caller's result
storage, if successful.
result | storage for the resulting value if successful, otherwise unchanged. |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1565 of file ringbuffer.hpp.
|
inlinenoexcept |
Dequeues the oldest enqueued min(dest_len, size()>=min_count)
elements by copying them into the given consecutive 'dest' storage.
The ring buffer slots will be released and its value moved to the caller's dest
storage, if successful.
Method is non blocking and returns immediately;.
dest | pointer to first storage element of dest_len consecutive elements to store the values, if successful. |
dest_len | number of consecutive elements in dest , hence maximum number of elements to return. |
min_count | minimum number of consecutive elements to return. |
Definition at line 1582 of file ringbuffer.hpp.
|
inlinenoexcept |
Dequeues the oldest enqueued min(dest_len, size()>=min_count)
elements by copying them into the given consecutive 'dest' storage.
The ring buffer slots will be released and its value moved to the caller's dest
storage, if successful.
dest | pointer to first storage element of dest_len consecutive elements to store the values, if successful. |
dest_len | number of consecutive elements in dest , hence maximum number of elements to return. |
min_count | minimum number of consecutive elements to return |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1604 of file ringbuffer.hpp.
|
inlinenoexcept |
Dequeues the oldest enqueued min(dest_len, size()>=min_count)
elements by copying them into the given consecutive 'dest' storage.
The ring buffer slots will be released and its value moved to the caller's dest
storage, if successful.
dest | pointer to first storage element of dest_len consecutive elements to store the values, if successful. |
dest_len | number of consecutive elements in dest , hence maximum number of elements to return. |
min_count | minimum number of consecutive elements to return |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1624 of file ringbuffer.hpp.
|
inlinenoexcept |
Drops up to max_count
oldest enqueued elements, but may drop less if not available.
Method is non blocking and returns immediately;.
max_count | maximum number of elements to drop from ringbuffer. |
Definition at line 1638 of file ringbuffer.hpp.
|
inlinenoexcept |
Drops exactly count
oldest enqueued elements, will block until they become available.
In count
elements are not available to drop even after blocking for timeoutMS
, no element will be dropped.
count | number of elements to drop from ringbuffer. |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1662 of file ringbuffer.hpp.
|
inlinenoexcept |
Drops exactly count
oldest enqueued elements, will block until they become available.
In count
elements are not available to drop even after blocking for timeoutMS
, no element will be dropped.
count | number of elements to drop from ringbuffer. |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1684 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given element by moving it into this ringbuffer storage.
Returns true if successful, otherwise false in case buffer is full.
Method is non blocking and returns immediately;.
e | value to be moved into this ringbuffer |
Definition at line 1699 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given element by moving it into this ringbuffer storage.
e | value to be moved into this ringbuffer |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1717 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given element by moving it into this ringbuffer storage.
e | value to be moved into this ringbuffer |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1733 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given element by copying it into this ringbuffer storage.
Returns true if successful, otherwise false in case buffer is full.
Method is non blocking and returns immediately;.
Definition at line 1747 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given element by copying it into this ringbuffer storage.
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1764 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given element by copying it into this ringbuffer storage.
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1779 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given range of consecutive elements by copying it into this ringbuffer storage.
Returns true if successful, otherwise false in case buffer is full.
Method is non blocking and returns immediately;.
first | pointer to first consecutive element to range of value_type [first, last) |
last | pointer to last consecutive element to range of value_type [first, last) |
Definition at line 1795 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given range of consecutive elementa by copying it into this ringbuffer storage.
first | pointer to first consecutive element to range of value_type [first, last) |
last | pointer to last consecutive element to range of value_type [first, last) |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
timeout_occurred | result value set to true if a timeout has occurred |
Definition at line 1814 of file ringbuffer.hpp.
|
inlinenoexcept |
Enqueues the given range of consecutive elementa by copying it into this ringbuffer storage.
first | pointer to first consecutive element to range of value_type [first, last) |
last | pointer to last consecutive element to range of value_type [first, last) |
timeout | maximum duration in fractions of seconds to wait, where fractions_i64::zero waits infinitely |
Definition at line 1831 of file ringbuffer.hpp.
|
staticconstexpr |
Definition at line 184 of file ringbuffer.hpp.
|
staticconstexpr |
Definition at line 185 of file ringbuffer.hpp.
|
staticconstexpr |
Definition at line 186 of file ringbuffer.hpp.