mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-08-12 22:43:41 -04:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -377,8 +377,7 @@ void SDRThread::readLoop() {
|
||||
updateSettings();
|
||||
readStream(iqDataOutQueue);
|
||||
}
|
||||
|
||||
buffers.purge();
|
||||
iqDataOutQueue->flush();
|
||||
}
|
||||
|
||||
void SDRThread::updateGains() {
|
||||
|
||||
Reference in New Issue
Block a user