replaced usleep which waits for queue to have data, with semaphores

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@732 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2014-02-06 14:54:01 +00:00
parent f5413637c4
commit 83405b70c8
4 changed files with 16 additions and 3 deletions

View File

@ -3237,6 +3237,7 @@ int* slsDetector::readFrame(){
retval=getDataFromDetector();
if (retval) {
dataQueue.push(retval);
sem_post(&queue_mutex);
controlSocket->Disconnect();
}
}
@ -3333,6 +3334,7 @@ int* slsDetector::readAll(){
//std::cout << "-" << flush ;
#endif
dataQueue.push(retval);
sem_post(&queue_mutex);
}
controlSocket->Disconnect();
}
@ -3393,6 +3395,7 @@ int* slsDetector::startAndReadAll(){
//std::cout<< "-" << flush;
#endif
dataQueue.push(retval);
sem_post(&queue_mutex);
}
controlSocket->Disconnect();