message source: notify shutdown also w/ EOF

This commit is contained in:
Bastian Bloessl
2015-10-24 01:09:31 +02:00
parent d620d56e3b
commit 85de8f71dc
+2
View File
@@ -67,6 +67,7 @@ periodic_msg_source_impl::run(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::from_long(1))); post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::from_long(1)));
} }
break; break;
@@ -91,6 +92,7 @@ periodic_msg_source_impl::run(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::from_long(1))); post(pmt::mp("system"), pmt::cons(pmt::mp("done"), pmt::from_long(1)));
} }
} }