diff options
author | Bastian Bloessl <bloessl@ccs-labs.org> | 2016-04-28 15:33:14 +0200 |
---|---|---|
committer | Bastian Bloessl <bloessl@ccs-labs.org> | 2016-06-29 09:10:22 +0200 |
commit | 5197311dd22744b784ff9ae2cd965a26ef04f4a4 (patch) | |
tree | 8714dc841c2f7406e96a4f65236df198ac7e0b29 /gnuradio-runtime/lib/basic_block.cc | |
parent | c7c6820cb823042accab0dddf031c55acb108d62 (diff) |
runtime: delete blocking wait for message
this is always bad practice
Diffstat (limited to 'gnuradio-runtime/lib/basic_block.cc')
-rw-r--r-- | gnuradio-runtime/lib/basic_block.cc | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/gnuradio-runtime/lib/basic_block.cc b/gnuradio-runtime/lib/basic_block.cc index 082d0753c8..89aa9b8671 100644 --- a/gnuradio-runtime/lib/basic_block.cc +++ b/gnuradio-runtime/lib/basic_block.cc @@ -228,29 +228,6 @@ namespace gr { } pmt::pmt_t - basic_block::delete_head_blocking(pmt::pmt_t which_port, unsigned int millisec) - { - gr::thread::scoped_lock guard(mutex); - - if (millisec) { - boost::system_time const timeout = boost::get_system_time() + boost::posix_time::milliseconds(millisec); - while (empty_p(which_port)) { - if (!msg_queue_ready[which_port]->timed_wait(guard, timeout)) { - return pmt::pmt_t(); - } - } - } else { - while(empty_p(which_port)) { - msg_queue_ready[which_port]->wait(guard); - } - } - - pmt::pmt_t m(msg_queue[which_port].front()); - msg_queue[which_port].pop_front(); - return m; - } - - pmt::pmt_t basic_block::message_subscribers(pmt::pmt_t port) { return pmt::dict_ref(d_message_subscribers,port,pmt::PMT_NIL); |