mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-08-10 21:43:40 -04:00
Flush queues on terminate() calls to unblock push()s and so ease threads termination
This commit is contained in:
@@ -188,10 +188,7 @@ void SDRPostThread::run() {
|
||||
} //end while
|
||||
|
||||
//Be safe, remove as many elements as possible
|
||||
if (iqVisualQueue) {
|
||||
iqVisualQueue->flush();
|
||||
}
|
||||
|
||||
iqVisualQueue->flush();
|
||||
iqDataInQueue->flush();
|
||||
iqDataOutQueue->flush();
|
||||
iqActiveDemodVisualQueue->flush();
|
||||
@@ -201,6 +198,11 @@ void SDRPostThread::run() {
|
||||
|
||||
void SDRPostThread::terminate() {
|
||||
IOThread::terminate();
|
||||
//unblock push()
|
||||
iqVisualQueue->flush();
|
||||
iqDataInQueue->flush();
|
||||
iqDataOutQueue->flush();
|
||||
iqActiveDemodVisualQueue->flush();
|
||||
}
|
||||
|
||||
void SDRPostThread::runSingleCH(SDRThreadIQData *data_in) {
|
||||
|
||||
Reference in New Issue
Block a user