Fix CID 169525 Data race condition

This commit is contained in:
Dennis Klein
2017-05-17 18:44:51 +02:00
parent c78541432f
commit ec786dce03
3 changed files with 16 additions and 1 deletions

View File

@@ -410,6 +410,20 @@ void FairMQChannel::UpdateRateLogging(const int rateLogging)
}
}
auto FairMQChannel::SetModified(const bool modified) -> void
{
try
{
unique_lock<mutex> lock(fChannelMutex);
fModified = modified;
}
catch (exception& e)
{
LOG(ERROR) << "Exception caught in FairMQChannel::SetModified: " << e.what();
exit(EXIT_FAILURE);
}
}
bool FairMQChannel::IsValid() const
{
try