3 Jun
2009
3 Jun
'09
1:24 p.m.
Ovanes Markarian ha scritto:
If you don't start the threads from the global scope (after the main has been entered) you may use the Schwarz-Counter (also known as Nifty-Counter) idiom.
It is well described here: http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Nifty_Counter
This is how Jerry Schwarz implemented the thread safe initialization of global iostream objects in STL: cout, cerr, clog etc.
Regards, Ovanes
Thanks Ovanes, It's interesting and I didn't know :-P Daniele.