TH_CLEAN_3: Use of non-blocking try_pop() when possible,

AudioThread concurrent access hardening and simplified,
and misc.
This commit is contained in:
vsonnier
2016-07-05 21:45:42 +02:00
parent 3bf17d0f40
commit b495b388c9
16 changed files with 223 additions and 149 deletions
+7 -4
View File
@@ -215,11 +215,14 @@ void SDRPostThread::run() {
if (doUpdate) {
updateActiveDemodulators();
}
}
} //end while
if (iqVisualQueue && !iqVisualQueue->empty()) {
DemodulatorThreadIQData *visualDataDummy;
iqVisualQueue->pop(visualDataDummy);
//TODO: Why only 1 element was removed before ?
DemodulatorThreadIQData *visualDataDummy;
while (iqVisualQueue && iqVisualQueue->try_pop(visualDataDummy)) {
//nothing
//TODO: What about the refcounts ?
}
// buffers.purge();