mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
put some locking in stop acquisition and startandreadallnowait (bugs threadpool with more evernts than normal due to main and processing thread with no locks for detector releated stuff, zmqthreadpool not required, r_restreamstop moved to status stop when idle
This commit is contained in:
@ -4106,6 +4106,9 @@ int slsDetector::startAcquisition(){
|
||||
};
|
||||
int slsDetector::stopAcquisition(){
|
||||
|
||||
runStatus s = getRunStatus();
|
||||
runStatus r = getReceiverStatus();
|
||||
|
||||
int fnum=F_STOP_ACQUISITION;
|
||||
int ret=FAIL;
|
||||
char mess[MAX_STR_LENGTH]="";
|
||||
@ -4127,6 +4130,11 @@ int slsDetector::stopAcquisition(){
|
||||
}
|
||||
}
|
||||
thisDetector->stoppedFlag=1;
|
||||
|
||||
if ((thisDetector->receiver_upstream) && (s == IDLE) && (r == IDLE)) {
|
||||
restreamStopFromReceiver();
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
||||
|
||||
@ -9232,8 +9240,10 @@ int slsDetector::restreamStopFromReceiver(){
|
||||
}
|
||||
if(ret==FORCE_UPDATE)
|
||||
ret=updateReceiver();
|
||||
else if (ret == FAIL)
|
||||
else if (ret == FAIL) {
|
||||
setErrorMask((getErrorMask())|(RESTREAM_STOP_FROM_RECEIVER));
|
||||
std::cout << " Could not restream stop dummy packet from receiver" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user