From: John Maddock (john_at_[hidden])
Date: 2007-04-30 05:10:48
Gottlob Frege wrote:
> If it is using errno, can I assume it is not thread-safe? Any other
> threading issues?
Darn, "thread safety" is another page of docs I've been meaning to write !
As Stefan has said already, errno should be thread safe already (otherwise
none of the std lib math functions would be thread safe?). If you're still
not happy, turn on reporting of errors via exceptions and errno gets left
Other than that, the code is intended to be thread safe *for built in
real-number types* : so float, double and long double are all thread safe.
For non-built-in types - NTL::RR for example - initialisation of the various
constants used in the implementation is potentially *not* thread safe. I
don't like this at all, but it would be a signficant challenge to fix it. I
believe that some compilers are now starting to offer the option of having
static-constants initialised in a thread safe manner (Commeau, and maybe
others?), if that's the case then the problem is solved. This is a topic of
hot debate for the next C++ std revision BTW, so hopefully all compilers
will be required to do the right thing here at some point.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk