Changed place where thread join function is invoked to run().
diff --git a/lib/misc_utils/burst_source_impl.cc b/lib/misc_utils/burst_source_impl.cc
index b6f2940..336838b 100644
--- a/lib/misc_utils/burst_source_impl.cc
+++ b/lib/misc_utils/burst_source_impl.cc
@@ -58,13 +58,9 @@
*/
burst_source_impl::~burst_source_impl()
{
- if (d_input_file.is_open())
- {
- d_input_file.close();
+ if (d_finished == false){
+ d_finished = true;
}
- d_finished = true;
- d_thread->interrupt();
- d_thread->join();
}
bool burst_source_impl::start()
@@ -78,8 +74,6 @@
bool burst_source_impl::stop()
{
d_finished = true;
- d_thread->interrupt();
- d_thread->join();
return block::stop();
}
@@ -97,12 +91,14 @@
{
break;
}
+
std::string s(unserialized, PMT_SIZE);
pmt::pmt_t burst = pmt::deserialize_str(s);
message_port_pub(pmt::mp("out"), burst);
}
d_input_file.close();
- stop();
+ d_thread->interrupt();
+ d_thread->join();
}
} /* namespace gsm */
} /* namespace gr */