mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
910/restream stop delay (#1093)
* wait a bit for post processor to process the dummy * refactoring * minor
This commit is contained in:
parent
84e83bf551
commit
bf82aeee8d
@ -1177,10 +1177,19 @@ int DetectorImpl::acquire() {
|
|||||||
if (dataReady == nullptr) {
|
if (dataReady == nullptr) {
|
||||||
setJoinThreadFlag(true);
|
setJoinThreadFlag(true);
|
||||||
} else if (receiver) {
|
} else if (receiver) {
|
||||||
while (numZmqRunning != 0) {
|
// wait for postprocessor to process dummies
|
||||||
Parallel(&Module::restreamStopFromReceiver, {});
|
if (dataReady != nullptr) {
|
||||||
// increase time for fewer dummy packets to process
|
// process dummy from stop receier
|
||||||
std::this_thread::sleep_for(std::chrono::seconds(2));
|
if (numZmqRunning != 0)
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
|
while (numZmqRunning != 0) {
|
||||||
|
Parallel(&Module::restreamStopFromReceiver, {});
|
||||||
|
// 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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dataProcessingThread.join();
|
dataProcessingThread.join();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user