From 7ebec8cc4b5e3a9eb480e3f954f9425d92e73a18 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Thu, 7 Mar 2013 14:24:52 -0500
Subject: core: protect against popping a message off the queue if no handler
 is attached.

This mostly solves a problem with threads being launched in random
order, so a handler might not be established yet, even if there is a
message waiting. Fixes Issue #514.
---
 gnuradio-core/src/python/gnuradio/gr/qa_pdu.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py b/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py
index c1110c10bd..098aabb4a2 100755
--- a/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py
+++ b/gnuradio-core/src/python/gnuradio/gr/qa_pdu.py
@@ -63,7 +63,6 @@ class test_pdu(gr_unittest.TestCase):
         #pmt.pmt_print(pi)
         #print "Stream to PDU output ports: "
         #pmt.pmt_print(po)
-        time.sleep(0.1)
 
         self.tb.connect(src, snk)
         self.tb.connect(src, snk2)
@@ -84,7 +83,7 @@ class test_pdu(gr_unittest.TestCase):
         src.to_basic_block()._post( port, msg )
 
         while(dbg.num_messages() < 1):
-            time.sleep(0.5)
+            time.sleep(0.1)
         self.tb.stop()
         self.tb.wait()
 
-- 
cgit v1.2.3