Boost logo

Boost :

Subject: Re: [boost] [thread] Can't use boost/thread/mutex.hpp without boost_system
From: Anthony Williams (anthony.ajw_at_[hidden])
Date: 2012-01-20 02:42:28


On 19/01/12 21:39, Vicente J. Botet Escriba wrote:
> Le 19/01/12 13:12, Artyom Beilis a écrit :
>> ----- Original Message -----
>>> From: Anthony Williams<anthony.ajw_at_[hidden]>
>>> On 18/01/12 14:01, Vicente Botet wrote:
>>>> I was not aware that Boost.Thread was working as a header only library.
>>> This was a much-requested feature, so I made sure that boost::mutex
>>> at least was
>>> usable header-only.
>>>
> Oh, I remember that now.
>> So would this be fixed or I should switch to lightweight mutex?
>>
>>
> As far as Boost.System is not-header-only we can not have both:
> boost::mutex header-only and compliant with c++11.
> As said before, I could let the user the possibility to set Boost.Thread
> to don't use Boost.System via BOOST_THREAD_DONT_USE_SYSTEM. Artyom,
> Anthony is this satisfactory for you?

That sounds reasonable to me: if people wish to use Boost.Thread
header-only then they can define the macro, but anyone who needs to use
the full features must link against the library, so can cope with the
additional dependency on Boost.System.

It would be great if we could ensure that code with incompatible
settings wouldn't link. We could mask out the parts of Boost.Thread that
do need the library with that macro, for starters, so we don't need
separate builds of the library with and without that macro.

Anthony

-- 
Author of C++ Concurrency in Action     http://www.stdthread.co.uk/book/
just::thread C++11 thread library             http://www.stdthread.co.uk
Just Software Solutions Ltd       http://www.justsoftwaresolutions.co.uk
15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976

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