mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 12:57:13 +02:00
910/restream stop delay (#1093)
* wait a bit for post processor to process the dummy * refactoring * minor
This commit is contained in:
@ -1177,12 +1177,21 @@ int DetectorImpl::acquire() {
|
|||||||
if (dataReady == nullptr) {
|
if (dataReady == nullptr) {
|
||||||
setJoinThreadFlag(true);
|
setJoinThreadFlag(true);
|
||||||
} else if (receiver) {
|
} else if (receiver) {
|
||||||
|
// wait for postprocessor to process dummies
|
||||||
|
if (dataReady != nullptr) {
|
||||||
|
// process dummy from stop receier
|
||||||
|
if (numZmqRunning != 0)
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
while (numZmqRunning != 0) {
|
while (numZmqRunning != 0) {
|
||||||
Parallel(&Module::restreamStopFromReceiver, {});
|
Parallel(&Module::restreamStopFromReceiver, {});
|
||||||
// increase time for fewer dummy packets to process
|
// time to process restream dummy
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
|
// increase time for fewer dummies and to catch up
|
||||||
|
if (numZmqRunning != 0)
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
std::this_thread::sleep_for(std::chrono::seconds(2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
dataProcessingThread.join();
|
dataProcessingThread.join();
|
||||||
|
|
||||||
if (acquisition_finished != nullptr) {
|
if (acquisition_finished != nullptr) {
|
||||||
|
Reference in New Issue
Block a user