Boost logo

Boost :

From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2008-01-31 17:04:50


Hartmut Kaiser wrote:
> Stefan,
>
>>> I'm not sure where the -lpthread needs to be added (I added it
>> manually
>>> to the link command and it succeeded), or in fact, why wave links to
>>> boost_thread at all. It doesn't use threads underneath, or does it ?
>> It turns out the dependency on boost_thread is dragged in by
>> boost.spirit. (I modified the subject line to reflect this.)
>>
>> I'm not sure in what way boost_thread is used there, but I would hope
>> that the decision to use threads (and boost_thread) could be left to
>> the
>> library's user. Only pay for what you really use, or so the saying
>> goes...
>>
>> Is it possible to modify the config logic to have some users only use
>> the subset of boost.spirit that doesn't require boost_thread ?
>>
>> (I'm writing a preprocessor and I do not want to use threads, so why
>> would I have to link with boost_thread and pthread ?)
>
> Wave drags in threads only if it gets compiled in an environment requiring
> threads (BOOST_HAS_THREADS is defined). If you build Wave such that
> BOOST_HAS_THREADS is not defined, it won't depend on threads.

What happens when one wants to use Wave without threads in a platform
that has threads?

Also...

Is a thread safe Wave and Spirit (or Phoenix) that doesn't use Boost
Threads available? I.e. are there reentrant versions available?

By the way the reason Stefan and I are asking about this is that
currently using a static version of Wave doesn't build on some platforms
as Boost Threads needs extra user work to build statically.

-- 
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org (msn) - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

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