Fix demodulator termination / thread lock

This commit is contained in:
Charles J. Cliffe
2015-01-11 20:26:51 -05:00
parent e7b22bd186
commit 2b6da304ef
5 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -239,10 +239,10 @@ void DemodulatorPreThread::threadMain() {
delete iqDataDel;
}
std::cout << "Demodulator preprocessor thread done." << std::endl;
DemodulatorThreadCommand tCmd(DemodulatorThreadCommand::DEMOD_THREAD_CMD_DEMOD_PREPROCESS_TERMINATED);
tCmd.context = this;
threadQueueNotify->push(tCmd);
std::cout << "Demodulator preprocessor thread done." << std::endl;
}
void DemodulatorPreThread::terminate() {
@@ -250,4 +250,6 @@ void DemodulatorPreThread::terminate() {
DemodulatorThreadIQData *inp = new DemodulatorThreadIQData; // push dummy to nudge queue
iqInputQueue->push(inp);
workerThread->terminate();
t_Worker->detach();
delete t_Worker;
}