mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +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,12 +1177,21 @@ int DetectorImpl::acquire() {
|
||||
if (dataReady == nullptr) {
|
||||
setJoinThreadFlag(true);
|
||||
} 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) {
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
dataProcessingThread.join();
|
||||
|
||||
if (acquisition_finished != nullptr) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user