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:
Dhanya Maliakal
2017-12-08 11:40:07 +01:00
parent bf9905ad2a
commit 40a7b3983a
8 changed files with 28 additions and 89 deletions

View File

@ -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;