Boost logo

Boost Users :

From: Roland Schwarz (roland.schwarz_at_[hidden])
Date: 2006-10-30 17:44:48


Ovanes Markarian wrote:
> I saw that shared_ptr used lightweight_mutext to enable locking/unlocking in MT environments. Is
> it an official class which I could also use in my project, or should I really bind to the boost
> threading library?

You can see that it is contained in detail subdirectory, which means:
implementation detail.

light-weight as far as I can tell means header-only. The mutex from
Boost.Thread also uses the same CRITICAL_SECTION object that is used
by the lightweight mutex. The same is true for pthreads implementation.

Whether you prefer your project depending on internal details, or
prefer header only (longer compile times) or library (slightly more
complicated setup) is entirely up to you.

I however would recommend to bind to Boost.Thread ;-)

Roland


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