summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/lib/tpb_thread_body.cc
diff options
context:
space:
mode:
authorAndrej Rode <mail@andrejro.de>2017-04-13 23:38:12 -0700
committerAndrej Rode <mail@andrejro.de>2017-04-23 16:09:13 -0700
commit10b7f835854f46ac390fdb6954d312a6b0ba30e9 (patch)
tree681b9a7b2a66eb5d09804d1acfff16017b686775 /gnuradio-runtime/lib/tpb_thread_body.cc
parentd1a5dbf904a4512e6c9c14720a40cd3727650aba (diff)
runtime: add barrier to synchronize block startup
Diffstat (limited to 'gnuradio-runtime/lib/tpb_thread_body.cc')
-rw-r--r--gnuradio-runtime/lib/tpb_thread_body.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnuradio-runtime/lib/tpb_thread_body.cc b/gnuradio-runtime/lib/tpb_thread_body.cc
index 93591feee2..72fc671c40 100644
--- a/gnuradio-runtime/lib/tpb_thread_body.cc
+++ b/gnuradio-runtime/lib/tpb_thread_body.cc
@@ -32,7 +32,7 @@
namespace gr {
- tpb_thread_body::tpb_thread_body(block_sptr block, int max_noutput_items)
+ tpb_thread_body::tpb_thread_body(block_sptr block, gr::thread::barrier_sptr start_sync, int max_noutput_items)
: d_exec(block, max_noutput_items)
{
//std::cerr << "tpb_thread_body: " << block << std::endl;
@@ -92,6 +92,7 @@ namespace gr {
// make sure our block isnt finished
block->clear_finished();
+ start_sync->wait();
while(1) {
tpb_loop_top:
boost::this_thread::interruption_point();