Skip to content

Commit

Permalink
Fix race condition from hashmap resize operation
Browse files Browse the repository at this point in the history
  • Loading branch information
keenanlang committed Apr 16, 2022
1 parent 15b478c commit 45eb245
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions LambdaApp/src/ADLambda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void ADLambda::acquireThread(int receiver)

const int frame_no = acquired[0]->nr();

this->lock();
this->lock();
if (this->frames.find(frame_no) == this->frames.end())
{
epicsTimeStamp currentTime = epicsTime::getCurrent();
Expand All @@ -600,9 +600,10 @@ void ADLambda::acquireThread(int receiver)

incrementValue(ADNumImagesCounter);
}

NDArray* output = this->frames[frame_no];
this->unlock();

NDArray* output = this->frames[frame_no];
output->getInfo(&info);
numAcquired += 1;

Expand Down

0 comments on commit 45eb245

Please sign in to comment.