
13 Sep
2005
13 Sep
'05
4:46 p.m.
I think it would be safe to create the mutex as a global variable, with the documented requirement that the program not spawn any threads until after it enters main. Quick question though: Are global variables destroyed only when the last thread exits (ensuring that the point of destruction of all globals is atomic), or do they die when the main thread exits? -Jason