Boost logo

Boost :

From: Jason Hise (chaos_at_[hidden])
Date: 2005-08-02 14:32:15


Jonathan Turkanis wrote:

>Jason Hise wrote:
>
>
>>So to avoid the whole mess regarding the DCLP, the best approach
>>would probably be eager initialization, before the program enters
>>a multi-threaded context. Is initializing from the constructor of
>>a namespace-scope global enough to ensure this?
>>
>>
>I don't think so, since you might want to access singletons from static
>initializers in other translation units.
>
>Have you considered using call_once:
>http://www.boost.org/doc/html/call_once.html?
>
Why does it require that the function which is called once not be
allowed to throw? I am not sure that I can meet this requirement, as I
may need to dynamically allocate memory.

-Jason


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk