Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-04-17 16:10:14


Boris wrote:
> Where does BOOST_HAS_THREADS come from? I see a source
> code comment in /boost/config/win32.hpp (I'm on Windows) mentioning
> BOOST_HAS_THREADS but no definition?

BOOST_HAS_THREADS is defined automatically when _MT is defined; most Windows
compilers define _MT when their multithreaded runtime library is selected.

> But after having glanced over
> /boost/config/user.hpp the right thing is probably to define
> BOOST_DISABLE_THREADS to get rid of all synchronization?

Yes, this would work. BOOST_DISABLE_THREADS is a user macro that causes
BOOST_HAS_THREADS to not be defined, regardless of whether the platform is
detected to support multiple threads.

The configuration macros are described in

http://www.boost.org/libs/config/config.htm


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