|
Boost : |
Subject: Re: [boost] [threads] making parts of Boost.Threads header-only
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2009-04-07 12:59:51
On Tue, Apr 7, 2009 at 8:57 AM, Anthony Williams <anthony.ajw_at_[hidden]> wrote:
> joaquin_at_[hidden] writes:
>
>> Looks like a sensible part of Boost.Threads, namely that
>> dealing with mutexes and locks, would be header-only
>> but for its relying on boost/thread/exceptions.hpp, whose
>> implementation is located at /libs/thread/*/exceptions.cpp.
>>
>> Given that this .cpp mostly consists of extremely simple
>> definitions (as simple as do-nothing functions in many cases),
>> would it make sense to move this to inline definitions in
>> boost/thread/exceptions.hpp thus making mutexes and locks
>> header-only? This would greatly enhance the appeal of this
>> part of Boost.Threads, as having to link a separate module
>> is a considerable burden.
>
> That seems sensible.
I am against such a move. Boost Threads requires linking for other
features which makes it one of the few libraries in Boost that can be
properly designed to avoid unnecessary physical coupling. Unless
something is proven to cause performance problems it should not be
inlined, regardless of how simple it is.
Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk