How can I proceed if no message is received?

In GRC, I defined a message queue like below:
self.msg_q = gr.msg_queue()

It waits for the USRP transmitter, and read the message received in the
USRP receiver in the local machine, using the code like below:

    m = tb.msg_q.delete_head()

But if there is no message sent. It seems that the program halts and
waits for the message to be sent. How can I let the program continue to
run from here?

Best

On Tue, Jan 4, 2011 at 2:19 PM, JieLiu [email protected] wrote:

here?

Best

There is a msg_queue method “delete_head_nowait.” Look at the
gr_msg_queue page in the Doxygen documentation.

Tom

Thanks! I will have a try