|
Boost Users : |
Subject: Re: [Boost-users] [Thread][win32, msvc] Mutexes
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-28 10:21:55
Anthony Williams:
>> If not so, what's the reason for boost::detail::lightweight_mutex to
>> exist ?
>
> I think it's a historic artifact from versions of boost.thread prior
> to 1.35.0 when boost::mutex required linking to the thread library,
> which allowed mutexes to be used in header-only boost libraries.
True. "lightweight" was an unfortunate name; it's only lightweight in that
it doesn't require a library build step. It's in the detail:: namespace, so
this should be enough of a hint that it's only an implementation detail of
other Boost libraries and is not meant to be used directly.
> I'll leave it to Peter to comment on whether he thinks it's still
> required and why.
I just tried a simple #include <boost/thread/mutex.hpp> under MSVC, and I
got (a) <windows.h> included and (b) an autolink reference to
libboost_thread (which surprised me; it used to "only" autolink to
libboost_datetime).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net