message sources: del try/catch block

forgot why I added it in the first place
This commit is contained in:
Bastian Bloessl
2016-05-31 13:05:41 +02:00
parent 6f86f92ff4
commit 02ee21184a
2 changed files with 1 additions and 27 deletions
-12
View File
@@ -54,8 +54,6 @@ periodic_msg_source_impl::~periodic_msg_source_impl() {
void void
periodic_msg_source_impl::run(periodic_msg_source_impl *instance) { periodic_msg_source_impl::run(periodic_msg_source_impl *instance) {
try {
// flow graph startup delay // flow graph startup delay
boost::this_thread::sleep(boost::posix_time::milliseconds(500)); 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)); 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 void
+1 -15
View File
@@ -59,8 +59,6 @@ random_periodic_msg_source_impl::~random_periodic_msg_source_impl() {
void void
random_periodic_msg_source_impl::run(random_periodic_msg_source_impl *instance) { random_periodic_msg_source_impl::run(random_periodic_msg_source_impl *instance) {
try {
// flow graph startup delay // flow graph startup delay
boost::this_thread::sleep(boost::posix_time::milliseconds(500)); 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; d_finished = true;
if(d_quit) { if(d_quit) {
boost::this_thread::sleep(boost::posix_time::milliseconds(500)); 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::PMT_T));
post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::from_long(1)));
} }
break; 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)); 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 // Generate a random message