quill
Public Types | Public Member Functions | List of all members
detail::BoundedSPSCQueueImpl< T > Class Template Reference

A bounded single producer single consumer ring buffer. More...

#include <BoundedSPSCQueue.h>

Public Types

using integer_type = T
 

Public Member Functions

QUILL_ATTRIBUTE_HOT BoundedSPSCQueueImpl (integer_type capacity, HugePagesPolicy huge_pages_policy=HugePagesPolicy::Never, integer_type reader_store_percent=5)
 
 BoundedSPSCQueueImpl (BoundedSPSCQueueImpl const &)=delete
 Deleted.
 
BoundedSPSCQueueImploperator= (BoundedSPSCQueueImpl const &)=delete
 
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT std::byte * prepare_write (integer_type n) noexcept
 
QUILL_ATTRIBUTE_HOT void finish_write (integer_type n) noexcept
 
QUILL_ATTRIBUTE_HOT void commit_write () noexcept
 
QUILL_ATTRIBUTE_HOT void finish_and_commit_write (integer_type n) noexcept
 Finish and commit write as a single function.
 
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT std::byte * prepare_read () noexcept
 
QUILL_ATTRIBUTE_HOT void finish_read (integer_type n) noexcept
 
QUILL_ATTRIBUTE_HOT void commit_read () noexcept
 
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT bool empty () const noexcept
 Only meant to be called by the reader. More...
 
QUILL_NODISCARD integer_type capacity () const noexcept
 
QUILL_NODISCARD HugePagesPolicy huge_pages_policy () const noexcept
 

Detailed Description

template<typename T>
class detail::BoundedSPSCQueueImpl< T >

A bounded single producer single consumer ring buffer.

Member Function Documentation

◆ empty()

template<typename T>
QUILL_NODISCARD QUILL_ATTRIBUTE_HOT bool detail::BoundedSPSCQueueImpl< T >::empty ( ) const
inlinenoexcept

Only meant to be called by the reader.

Returns
true if the queue is empty

The documentation for this class was generated from the following file: