Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::sinks::unbounded_fifo_queue Class Reference

Unbounded FIFO log record queueing strategy. More...

#include <unbounded_fifo_queue.hpp>

Protected Member Functions

 unbounded_fifo_queue ()
 Default constructor. More...
 
template<typename ArgsT >
 unbounded_fifo_queue (ArgsT const &)
 Initializing constructor. More...
 
void enqueue (record_view const &rec)
 Enqueues log record to the queue. More...
 
bool try_enqueue (record_view const &rec)
 Attempts to enqueue log record to the queue. More...
 
bool try_dequeue_ready (record_view &rec)
 Attempts to dequeue a log record ready for processing from the queue, does not block if the queue is empty. More...
 
bool try_dequeue (record_view &rec)
 Attempts to dequeue log record from the queue, does not block if the queue is empty. More...
 
bool dequeue_ready (record_view &rec)
 Dequeues log record from the queue, blocks if the queue is empty. More...
 
void interrupt_dequeue ()
 Wakes a thread possibly blocked in the dequeue method. More...
 

Detailed Description

Unbounded FIFO log record queueing strategy.

The unbounded_fifo_queue class is intended to be used with the asynchronous_sink frontend as a log record queueing strategy.

This strategy implements the simplest logic of log record buffering between threads: the queue has no limits and imposes no ordering over the queued elements aside from the order in which they are enqueued. Because of this the queue provides decent performance and scalability, however if sink backends can't consume log records fast enough the queue may grow uncontrollably. When this is an issue, it is recommended to use one of the bounded strategies.

Constructor & Destructor Documentation

boost::sinks::unbounded_fifo_queue::unbounded_fifo_queue ( )
inlineprotected

Default constructor.

template<typename ArgsT >
boost::sinks::unbounded_fifo_queue::unbounded_fifo_queue ( ArgsT const &  )
inlineexplicitprotected

Initializing constructor.

Member Function Documentation

bool boost::sinks::unbounded_fifo_queue::dequeue_ready ( record_view rec)
inlineprotected

Dequeues log record from the queue, blocks if the queue is empty.

void boost::sinks::unbounded_fifo_queue::enqueue ( record_view const &  rec)
inlineprotected

Enqueues log record to the queue.

Referenced by try_enqueue().

void boost::sinks::unbounded_fifo_queue::interrupt_dequeue ( )
inlineprotected

Wakes a thread possibly blocked in the dequeue method.

bool boost::sinks::unbounded_fifo_queue::try_dequeue ( record_view rec)
inlineprotected

Attempts to dequeue log record from the queue, does not block if the queue is empty.

bool boost::sinks::unbounded_fifo_queue::try_dequeue_ready ( record_view rec)
inlineprotected

Attempts to dequeue a log record ready for processing from the queue, does not block if the queue is empty.

bool boost::sinks::unbounded_fifo_queue::try_enqueue ( record_view const &  rec)
inlineprotected

Attempts to enqueue log record to the queue.

References enqueue().


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