GNU Radio 3.7.2 C++ API
|
thread-safe message queue More...
#include <gnuradio/messages/msg_queue.h>
Public Member Functions | |
msg_queue (unsigned int limit) | |
~msg_queue () | |
void | insert_tail (pmt::pmt_t msg) |
Insert message at tail of queue. More... | |
pmt::pmt_t | delete_head () |
Delete message from head of queue and return it. Block if no message is available. More... | |
pmt::pmt_t | delete_head_nowait () |
If there's a message in the q, delete it and return it. If no message is available, return pmt::pmt_t(). More... | |
void | flush () |
Delete all messages from the queue. More... | |
bool | empty_p () const |
is the queue empty? More... | |
bool | full_p () const |
is the queue full? More... | |
unsigned int | count () const |
return number of messages in queue More... | |
unsigned int | limit () const |
return limit on number of message in queue. 0 -> unbounded More... | |
thread-safe message queue
gr::messages::msg_queue::msg_queue | ( | unsigned int | limit | ) |
gr::messages::msg_queue::~msg_queue | ( | ) |
|
inline |
return number of messages in queue
pmt::pmt_t gr::messages::msg_queue::delete_head | ( | ) |
Delete message from head of queue and return it. Block if no message is available.
pmt::pmt_t gr::messages::msg_queue::delete_head_nowait | ( | ) |
If there's a message in the q, delete it and return it. If no message is available, return pmt::pmt_t().
|
inline |
is the queue empty?
void gr::messages::msg_queue::flush | ( | ) |
Delete all messages from the queue.
|
inline |
is the queue full?
void gr::messages::msg_queue::insert_tail | ( | pmt::pmt_t | msg | ) |
Insert message at tail of queue.
msg | message |
Block if queue if full.
|
inline |
return limit on number of message in queue. 0 -> unbounded