Blocking strategy for handling log record queue overflows. More...
#include <block_on_overflow.hpp>
Public Member Functions | |
template<typename LockT > | |
bool | on_overflow (record_view const &, LockT &lock) |
Default constructor. More... | |
void | on_queue_space_available () |
This method is called by the queue when there appears a free space. More... | |
void | interrupt () |
This method is called by the queue to interrupt any possible waits in on_overflow . More... | |
Blocking strategy for handling log record queue overflows.
This strategy will cause enqueueing threads to block when the log record queue overflows. The blocked threads will be woken as soon as there appears free space in the queue, in the same order they attempted to enqueue records.
|
inline |
This method is called by the queue to interrupt any possible waits in on_overflow
.
The internal lock protecting the queue is locked when calling this method.
References boost::phoenix::context().
|
inline |
Default constructor.
This method is called by the queue when overflow is detected.
lock | An internal lock that protects the queue |
true | Attempt to enqueue the record again. |
false | Discard the record. |
References boost::phoenix::context().
|
inline |
This method is called by the queue when there appears a free space.
The internal lock protecting the queue is locked when calling this method.