mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-25 21:28:38 -05:00
FIX hang application, because SdrThread tries to auto-termitate itself
This commit is contained in:
parent
567d84711f
commit
5d1cb788e0
@ -298,6 +298,8 @@ int CubicSDR::OnExit() {
|
||||
|
||||
if (t_SDR) {
|
||||
t_SDR->join();
|
||||
delete t_SDR;
|
||||
t_SDR = nullptr;
|
||||
}
|
||||
|
||||
std::cout << "Terminating SDR post-processing thread.." << std::endl;
|
||||
@ -444,11 +446,6 @@ void CubicSDR::sdrThreadNotify(SDRThread::SDRThreadState state, std::string mess
|
||||
if (state == SDRThread::SDR_THREAD_MESSAGE) {
|
||||
notifyMessage = message;
|
||||
}
|
||||
if (state == SDRThread::SDR_THREAD_TERMINATED) {
|
||||
t_SDR->join();
|
||||
delete t_SDR;
|
||||
t_SDR = nullptr;
|
||||
}
|
||||
if (state == SDRThread::SDR_THREAD_FAILED) {
|
||||
notifyMessage = message;
|
||||
// wxMessageDialog *info;
|
||||
|
@ -378,11 +378,6 @@ void SDRThread::run() {
|
||||
}
|
||||
|
||||
std::cout << "SDR thread done." << std::endl;
|
||||
|
||||
if (!stopping.load()) {
|
||||
stopping.store(true);
|
||||
wxGetApp().sdrThreadNotify(SDRThread::SDR_THREAD_TERMINATED, "Done.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -48,7 +48,7 @@ private:
|
||||
public:
|
||||
SDRThread();
|
||||
~SDRThread();
|
||||
enum SDRThreadState { SDR_THREAD_MESSAGE, SDR_THREAD_INITIALIZED, SDR_THREAD_TERMINATED, SDR_THREAD_FAILED };
|
||||
enum SDRThreadState { SDR_THREAD_MESSAGE, SDR_THREAD_INITIALIZED, SDR_THREAD_FAILED };
|
||||
|
||||
virtual void run();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user