gui exception thrown from acquire caught properly in gui

This commit is contained in:
2020-11-17 17:39:34 +01:00
parent 6563965787
commit 7fcac35549
6 changed files with 18 additions and 17 deletions

View File

@ -1079,13 +1079,13 @@ int DetectorImpl::acquire() {
}
}
startProcessingThread(receiver);
// start receiver
if (receiver) {
Parallel(&Module::startReceiver, {});
}
startProcessingThread(receiver);
// start and read all
try {
Parallel(&Module::startAndReadAll, {});
@ -1126,10 +1126,10 @@ int DetectorImpl::acquire() {
(end.tv_nsec - begin.tv_nsec) / 1000000000.0)
<< " seconds";
} catch (...) {
if (dataProcessingThread.joinable()){
if (dataProcessingThread.joinable()) {
setJoinThreadFlag(true);
dataProcessingThread.join();
}
}
setAcquiringFlag(false);
throw;
}