Pol  Revision:3cfda13
Pol::Clib::message_queue< Message > Class Template Reference

#include <message_queue.h>

+ Inheritance diagram for Pol::Clib::message_queue< Message >:

Classes

struct  Canceled
 

Public Member Functions

 message_queue ()
 
 ~message_queue ()
 
void cancel ()
 
bool empty () const
 
void pop_remaining (std::list< Message > *msgs)
 
void pop_wait (Message *msg)
 
void pop_wait (std::list< Message > *msgs)
 
void push (Message const &msg)
 
void push (std::list< Message > &msg_list)
 
void push_move (Message &&msg)
 
std::size_t size () const
 
bool try_pop (Message *msg)
 tries to get a message true on success false otherwise More...
 

Private Attributes

bool _cancel
 
std::mutex _mutex
 
std::condition_variable _notifier
 
std::list< Message > _queue
 

Detailed Description

template<typename Message>
class Pol::Clib::message_queue< Message >

Definition at line 21 of file message_queue.h.

Constructor & Destructor Documentation

template<typename Message >
Pol::Clib::message_queue< Message >::message_queue ( )

Definition at line 62 of file message_queue.h.

template<typename Message >
Pol::Clib::message_queue< Message >::~message_queue ( )

Definition at line 67 of file message_queue.h.

References Pol::Clib::message_queue< Message >::cancel().

Member Function Documentation

template<typename Message >
bool Pol::Clib::message_queue< Message >::empty ( ) const
template<typename Message>
void Pol::Clib::message_queue< Message >::pop_remaining ( std::list< Message > *  msgs)
template<typename Message>
void Pol::Clib::message_queue< Message >::push ( std::list< Message > &  msg_list)
template<typename Message >
std::size_t Pol::Clib::message_queue< Message >::size ( ) const
template<typename Message>
bool Pol::Clib::message_queue< Message >::try_pop ( Message *  msg)

tries to get a message true on success false otherwise

Definition at line 131 of file message_queue.h.

References Pol::Clib::message_queue< Message >::_mutex, and Pol::Clib::message_queue< Message >::_queue.

Member Data Documentation

template<typename Message>
bool Pol::Clib::message_queue< Message >::_cancel
private

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