Currently studying about std::mutex and would love some help. If I've a code that looks like -
....
if(returnBoolValue())
{
std::lock_guard<std::mutex> lock(mutex_var);
....
....
}
....
is the std::lock_guard guarding the function returning the value inside if condition? ie. returnBoolValue()
And how should I prove it, if possible?
std::mutex- http://ift.tt/1kLTd8Kstd::lock_guard- http://ift.tt/1tWLqLO
Aucun commentaire:
Enregistrer un commentaire