 |
log4cplus
2.0.5
|
Go to the documentation of this file.
25 #ifndef LOG4CPLUS_HELPERS_QUEUE_H
26 #define LOG4CPLUS_HELPERS_QUEUE_H
30 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
34 #if ! defined (LOG4CPLUS_SINGLE_THREADED)
56 explicit Queue (
unsigned len = 100);
156 #endif // LOG4CPLUS_SINGLE_THREADED
158 #endif // LOG4CPLUS_HELPERS_QUEUE_H
flags_type signal_exit(bool drain=true)
Sets EXIT flag and DRAIN flag and sets internal event object into signaled state.
Single consumer, multiple producers queue.
flags_type flags
State flags.
Mutex mutex
Mutex protecting queue and flags.
queue_storage_type queue
Queue storage.
Semaphore sem
Semaphore that limits the queue length.
flags_type get_events(queue_storage_type *buf)
The get_events() function is used by queue's consumer.
flags_type put_event(spi::InternalLoggingEvent const &ev)
Puts event ev into queue, sets QUEUE flag and sets internal event object into signaled state.
std::deque< spi::InternalLoggingEvent > queue_storage_type
Queue storage type.
The internal representation of logging events.
helpers::SharedObjectPtr< Queue > QueuePtr
unsigned flags_type
Type of the state flags field.
ManualResetEvent ev_consumer
Event on which consumer can wait if it finds queue empty.
Flags
Possible state flags.