23 #ifndef INCLUDED_MSG_QUEUE_H
24 #define INCLUDED_MSG_QUEUE_H
50 std::deque<pmt::pmt_t> d_msgs;
80 bool empty_p()
const {
return d_msgs.empty(); }
83 bool full_p()
const {
return d_limit != 0 && count() >= d_limit; }
86 unsigned int count()
const {
return d_msgs.size(); }
89 unsigned int limit()
const {
return d_limit; }
thread-safe message queue
Definition: messages/msg_queue.h:42
msg_queue_sptr make_msg_queue(unsigned int limit=0)
unsigned int count() const
return number of messages in queue
Definition: messages/msg_queue.h:86
bool empty_p() const
is the queue empty?
Definition: messages/msg_queue.h:80
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
bool full_p() const
is the queue full?
Definition: messages/msg_queue.h:83
boost::mutex mutex
Definition: thread.h:46
boost::intrusive_ptr< pmt_base > pmt_t
typedef for shared pointer (transparent reference counting). See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
Definition: pmt.h:56
unsigned int limit() const
return limit on number of message in queue. 0 -> unbounded
Definition: messages/msg_queue.h:89
boost::condition_variable condition_variable
Definition: thread.h:48