Visual Studio Code – Why can mutex be used in different threads?
Using (writing) same variable in multiple threads simultaneously causes undefined behavior and crashes. Why using mutex, despite on fact that they are also variables, not causes undefined behavior? If mutex somehow can be used simultaneously, why not make all variables…