Answer the question
In order to leave comments, you need to log in
Question about using mutex and lock_guard?
The question is: Let's say we have a structure in which there is a lock_guard. We create a variable of the type of this structure (in the constructor we pass mutex to lock_guard). And it turns out that the code section (from the creation of the variable to the call of the destructor) will the code be executed by only one thread?
Answer the question
In order to leave comments, you need to log in
And it turns out that the code section (from the creation of the variable to the call of the destructor) will the code be executed by only one thread?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question