Boost logo

Boost Users :

Subject: Re: [Boost-users] [ASIO] Where to use CoInitizeEx
From: Daniele Barzotti (daniele.barzotti_at_[hidden])
Date: 2009-06-03 09:24:32


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.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net