C++ Language/Std/Multithreading/CriticalSection

A "critical section" is a code fragment that should be treated as atomic because of how it uses shared variables or resources. Extra code (inserted before and after a critical section) should enforce the mutually exclusive execution property (a.k.a. "mutex" property) within this critical section without causing "deadlock" nor "starvation".

Additional information about critical sections