DecoderStack::~DecoderStack()
{
- _decode_thread.interrupt();
- _decode_thread.join();
+ if (_decode_thread.joinable()) {
+ _decode_thread.interrupt();
+ _decode_thread.join();
+ }
}
const std::list< boost::shared_ptr<decode::Decoder> >&
shared_ptr<pv::view::LogicSignal> logic_signal;
shared_ptr<pv::data::Logic> data;
- _decode_thread.interrupt();
- _decode_thread.join();
+ if (_decode_thread.joinable()) {
+ _decode_thread.interrupt();
+ _decode_thread.join();
+ }
clear();
{
stop_capture();
- _sampling_thread.join();
+ if (_sampling_thread.joinable())
+ _sampling_thread.join();
if (_dev_inst)
_device_manager.release_device(_dev_inst);
sr_session_stop();
// Check that sampling stopped
- _sampling_thread.join();
+ if (_sampling_thread.joinable())
+ _sampling_thread.join();
}
set< shared_ptr<data::SignalData> > SigSession::get_data() const
void StoreSession::wait()
{
- _thread.join();
+ if (_thread.joinable())
+ _thread.join();
}
void StoreSession::cancel()