Even better thread and application termination:

- Now that timed-pop()/try_pop() prevent indefinite blocking it is best to flush() on thread stopping to unblock push()
- Reworked a bit the CubicSDR::OnExit() sequence, see comments.
This commit is contained in:
vsonnier
2017-06-01 19:56:33 +02:00
parent 8f608bbf5c
commit 3604b7f1ff
9 changed files with 59 additions and 36 deletions
+3 -2
View File
@@ -225,8 +225,9 @@ void SDRPostThread::run() {
iqVisualQueue->flush();
}
// buffers.purge();
// visualDataBuffers.purge();
iqDataInQueue->flush();
iqDataOutQueue->flush();
iqActiveDemodVisualQueue->flush();
// std::cout << "SDR post-processing thread done." << std::endl;
}
+1 -2
View File
@@ -377,8 +377,7 @@ void SDRThread::readLoop() {
updateSettings();
readStream(iqDataOutQueue);
}
buffers.purge();
iqDataOutQueue->flush();
}
void SDRThread::updateGains() {