|
| UnboundedSPSCQueue (size_t initial_bounded_queue_capacity, size_t max_capacity, HugePagesPolicy huge_pages_policy=quill::HugePagesPolicy::Never) |
| Constructor.
|
|
| UnboundedSPSCQueue (UnboundedSPSCQueue const &)=delete |
| Deleted.
|
|
UnboundedSPSCQueue & | operator= (UnboundedSPSCQueue const &)=delete |
|
| ~UnboundedSPSCQueue () |
| Destructor.
|
|
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT std::byte * | prepare_write (size_t nbytes) |
| Reserve contiguous space for the producer without making it visible to the consumer. More...
|
|
QUILL_ATTRIBUTE_HOT void | finish_write (size_t nbytes) noexcept |
| Complement to reserve producer space that makes nbytes starting from the return of reserve producer space visible to the consumer.
|
|
QUILL_ATTRIBUTE_HOT void | commit_write () noexcept |
| Commit write to notify the consumer bytes are ready to read.
|
|
QUILL_ATTRIBUTE_HOT void | finish_and_commit_write (size_t nbytes) noexcept |
| Finish and commit write as a single function.
|
|
QUILL_NODISCARD size_t | producer_capacity () const noexcept |
| Return the current buffer's capacity. More...
|
|
void | shrink (size_t capacity) |
| Shrinks the queue if capacity is a valid smaller power of 2. More...
|
|
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT ReadResult | prepare_read () |
| Prepare to read from the buffer a callback used for notifications to the user. More...
|
|
QUILL_ATTRIBUTE_HOT void | finish_read (size_t nbytes) noexcept |
| Consumes the next nbytes in the buffer and frees it back for the producer to reuse.
|
|
QUILL_ATTRIBUTE_HOT void | commit_read () noexcept |
| Commit the read to indicate that the bytes are read and are now free to be reused.
|
|
QUILL_NODISCARD size_t | capacity () const noexcept |
| Return the current buffer's capacity. More...
|
|
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT bool | empty () const noexcept |
| checks if the queue is empty More...
|
|
A single-producer single-consumer FIFO circular buffer.
The buffer allows producing and consuming objects
Production is wait free.
When the internal circular buffer becomes full a new one will be created and the production will continue in the new buffer.
Consumption is wait free. If not data is available a special value is returned. If a new buffer is created from the producer the consumer first consumes everything in the old buffer and then moves to the new buffer.