changes to test

This commit is contained in:
Dhanya Maliakal
2016-08-15 15:14:15 +02:00
parent 597f5e5d2a
commit fb8f49985b
2 changed files with 22 additions and 21 deletions

View File

@ -1608,7 +1608,7 @@ int* multiSlsDetector::startAndReadAll(){
int multiSlsDetector::startAndReadAllNoWait(){
/*
int i=0;
int ret=OK, ret1=OK;
@ -1636,7 +1636,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
}
return ret1;
/*
*/
// hanging randomly around 4000-5000 frames at 1sec exptime (threads dont return)
int i=0;
int ret=OK;
@ -1653,9 +1653,10 @@ int multiSlsDetector::startAndReadAllNoWait(){
Task* task = new Task(new func0_t<int,slsDetector,int>(&slsDetector::startAndReadAllNoWait,
detectors[idet],iret[idet]));
threadpool->add_task(task);
cprintf(GREEN,"task addeD\n");
}
}
threadpool->wait_for_tasks_to_complete();
}cout<<"waiting for tasks to copmlete"<<endl;
threadpool->wait_for_tasks_to_complete();cout<<"returned!"<<endl;
for(int idet=posmin; idet<posmax; idet++){
if((idet!=thisMultiDetector->masterPosition) && (detectors[idet])){
if(iret[idet] != NULL){
@ -1672,7 +1673,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
//master
int ret1=OK;
i=thisMultiDetector->masterPosition;
if (thisMultiDetector->masterPosition>=0) {
if (thisMultiDetector->masterPosition>=0) {cout<<"should never be here"<<endl;
if (detectors[i]) {
ret1=detectors[i]->startAndReadAllNoWait();
if(detectors[i]->getErrorMask())
@ -1683,7 +1684,7 @@ int multiSlsDetector::startAndReadAllNoWait(){
}
return ret;
*/
}