Merge pull request #37 from dls-controls/fix/destructor-hanging

Added check in desctructor to see if it had errored
This commit is contained in:
Mark Rivers
2020-03-16 17:01:07 -05:00
committed by GitHub

View File

@@ -362,6 +362,7 @@ AndorCCD::AndorCCD(const char *portName, const char *installPath, int cameraSeri
AndorCCD::~AndorCCD()
{
static const char *functionName = "~AndorCCD";
asynStatus status;
mExiting = true;
this->lock();
@@ -378,9 +379,10 @@ AndorCCD::~AndorCCD()
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s: %s\n",
driverName, functionName, e.c_str());
status = asynError;
}
this->unlock();
while (mExited < 2)
while (mExited < 2 and status != asynError)
epicsThreadSleep(0.2);
}