diff --git a/lib/periodic_msg_source_impl.cc b/lib/periodic_msg_source_impl.cc index c716a26..c4bfb3d 100644 --- a/lib/periodic_msg_source_impl.cc +++ b/lib/periodic_msg_source_impl.cc @@ -54,8 +54,6 @@ periodic_msg_source_impl::~periodic_msg_source_impl() { void periodic_msg_source_impl::run(periodic_msg_source_impl *instance) { - try { - // flow graph startup delay boost::this_thread::sleep(boost::posix_time::milliseconds(500)); @@ -84,16 +82,6 @@ periodic_msg_source_impl::run(periodic_msg_source_impl *instance) { } boost::this_thread::sleep(boost::posix_time::milliseconds(delay)); } - - } catch(boost::thread_interrupted) { - gr::thread::scoped_lock(d_mutex); - dout << "PMS: thread interrupted" << std::endl; - d_finished = true; - if(d_quit) { - boost::this_thread::sleep(boost::posix_time::milliseconds(500)); - post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::from_long(1))); - } - } } void diff --git a/lib/random_periodic_msg_source_impl.cc b/lib/random_periodic_msg_source_impl.cc index 7a1f55b..3b23846 100644 --- a/lib/random_periodic_msg_source_impl.cc +++ b/lib/random_periodic_msg_source_impl.cc @@ -59,8 +59,6 @@ random_periodic_msg_source_impl::~random_periodic_msg_source_impl() { void random_periodic_msg_source_impl::run(random_periodic_msg_source_impl *instance) { - try { - // flow graph startup delay boost::this_thread::sleep(boost::posix_time::milliseconds(500)); @@ -72,8 +70,7 @@ random_periodic_msg_source_impl::run(random_periodic_msg_source_impl *instance) d_finished = true; if(d_quit) { boost::this_thread::sleep(boost::posix_time::milliseconds(500)); - message_port_pub( pmt::mp("out"), pmt::PMT_EOF); - post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::from_long(1))); + post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::PMT_T)); } break; } @@ -91,17 +88,6 @@ random_periodic_msg_source_impl::run(random_periodic_msg_source_impl *instance) } boost::this_thread::sleep(boost::posix_time::milliseconds(delay)); } - - } catch(boost::thread_interrupted) { - gr::thread::scoped_lock(d_mutex); - dout << "PMS: thread interrupted" << std::endl; - d_finished = true; - if(d_quit) { - boost::this_thread::sleep(boost::posix_time::milliseconds(500)); - message_port_pub( pmt::mp("out"), pmt::PMT_EOF); - post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::from_long(1))); - } - } } // Generate a random message