diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-05-23 08:19:41 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-05-23 08:19:41 -0400 |
commit | 8d73b019c43b747e0b6ae1a8a8ae8a8342202a33 (patch) | |
tree | 92909311b9618f025f7f8a40a99b5faba6e3c430 /gr-blocks | |
parent | 7daef55cb11dfc05fdab9ee3f1f78ac2904dc300 (diff) | |
parent | 7ad4b69913cb43af9e6807078ef056034c97f8d2 (diff) |
Merge branch 'next' of git.gnuradio.org:gnuradio into next
Diffstat (limited to 'gr-blocks')
-rw-r--r-- | gr-blocks/lib/pdu_to_tagged_stream_impl.cc | 2 | ||||
-rw-r--r-- | gr-blocks/lib/udp_source_impl.cc | 4 | ||||
-rw-r--r-- | gr-blocks/python/qa_message_tags.py | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc index d6ad78cb9..f81d32454 100644 --- a/gr-blocks/lib/pdu_to_tagged_stream_impl.cc +++ b/gr-blocks/lib/pdu_to_tagged_stream_impl.cc @@ -68,7 +68,7 @@ namespace gr { if (noutput_items > 0) { // grab a message if one exists - pmt::pmt_t msg(delete_head_blocking(PDU_PORT_ID)); + pmt::pmt_t msg(delete_head_nowait(PDU_PORT_ID)); if (msg.get() == NULL) return nout; diff --git a/gr-blocks/lib/udp_source_impl.cc b/gr-blocks/lib/udp_source_impl.cc index e62c2b0df..7f4a2af3d 100644 --- a/gr-blocks/lib/udp_source_impl.cc +++ b/gr-blocks/lib/udp_source_impl.cc @@ -186,7 +186,9 @@ namespace gr { // because the conditional wait is interruptable while a // synchronous receive_from is not. boost::unique_lock<boost::mutex> lock(d_udp_mutex); - d_cond_wait.wait(lock); + + //use timed_wait to avoid permanent blocking in the work function + d_cond_wait.timed_wait(lock, boost::posix_time::milliseconds(10)); if(d_residual < 0) return -1; diff --git a/gr-blocks/python/qa_message_tags.py b/gr-blocks/python/qa_message_tags.py index 952c69945..ad4d2104e 100644 --- a/gr-blocks/python/qa_message_tags.py +++ b/gr-blocks/python/qa_message_tags.py @@ -11,6 +11,7 @@ class test_message_tags (gr_unittest.TestCase): rx_msgq = gr.msg_queue() for d in data: tx_msgq.insert_tail(gr.message_from_string(d)) + tx_msgq.insert_tail(gr.message(1)) # send EOF tb = gr.top_block() src = blocks.message_source(gr.sizeof_char, tx_msgq, "packet_length") snk = blocks.message_sink(gr.sizeof_char, rx_msgq, False, "packet_length") |