Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2005-03-13 13:26:06


On Sun, 13 Mar 2005 18:52:54 +0200, Peter Dimov wrote
> Jeff Garland wrote:
> >
> > I see. So is BOOST_HAS_THREADS or BOOST_DISABLE_THREADS the correct
> > macro for libraries to use?
>
> In theory, BOOST_HAS_THREADS is set by the config system if it
> detects a multithreaded platform, and BOOST_DISABLE_THREADS is set
> by the user to prevent this from happening.
>
> In practice, BOOST_DISABLE_THREADS is being automatically set from
> time to time, but I'm not sure whether one can rely on that.

Ok, thx -- just looking at the config code confirms that if DISABLE_THREADS is
set then HAS_THREADS gets unset -- so HAS_THREADS looks like the way to go.

I'm going to modify the config docs for BOOST_DISABLE_THREADS to make this
clearer if no one objects (just adding a second sentence...).

Currently reads:
When defined, disables threading support, even if the compiler in its current
translation mode supports multiple threads.

Suggested:
When defined, disables threading support, even if the compiler in its current
translation mode supports multiple threads. Normally this macro is defined by
the user in the BOOST_ROOT/config/user.hpp or via a compile option switch.

Jeff


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