Boost logo

Boost Users :

Subject: Re: [Boost-users] What is the best idiom for using call_once ?
From: Steve Lorimer (steve.lorimer_at_[hidden])
Date: 2012-11-17 18:24:39


John, perhaps not what you're looking for since you mention you need to
support multiple platforms, but just in case; gcc will automatically emit
code in order to make functional local static initialization thread-safe.

This feature is on by default, but can be explicitly disabled:

-fno-threadsafe-statics Do not emit the extra code to use the routines
specified in the C++ ABI for thread-safe initialization of local statics.
You can use this option to reduce code size slightly in code that doesn't
need to be thread-safe.



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