Boost logo

Boost :

From: Boris (boriss_at_[hidden])
Date: 2006-04-17 09:25:08


"Peter Dimov" <pdimov_at_[hidden]>,
news:003401c66084$5558a460$6407a8c0_at_pdimov2...
> Boris wrote:
>
>> If you define BOOST_SP_DISABLE_THREADS class
>> boost::detail::sp_counted_base doesn't use a mutex (see
>> http://www.boost.org/libs/smart_ptr/shared_ptr.htm#ThreadSafety).
>> However boost::detail::quick_allocator still uses a mutex as it checks
>> BOOST_HAS_THREADS but not BOOST_SP_DISABLE_THREADS (see
>> http://www.boost.org/boost/detail/quick_allocator.hpp).
>> Is this intentional (as quick_allocator might be used by other
>> classes)?
>
> Yes, this is intentional. Is your message a request for
> BOOST_QA_DISABLE_THREADS? :-)

Let's see. :-) 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? 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?

Boris


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