-
Eric Cano authored
Attempted fix to the bug CASTOR-4736: Race condition in unit tests (tapeServer_DataTransferSessionMissingFilesMigration_Test) The explicit separation between the decrement of the counter in AtomicCounter::operator-- was not enough to prevent the deadlock, which was reproduced. After just adding storage of the value in a variable and printout in DiskReadThreadPool::DiskReadWorkerThread::run, the problem seemed to be gone after about one hour of loop testing. I commit this change and push it to teamcity to get more chances of reproducing the issue (if it is still present). If this patch solves the problem, we might be facing a misguided compiler optimisation.
b2b5bb58