Subject: Re: [boost] Mutex vs Semaphore
From: Jean-Sebastien Stoezel (js.stoezel_at_[hidden])
Date: 2009-04-03 08:24:59
Interesting, thanks for the explanaition.
On 3-Apr-09, at 5:27 AM, Dmitry Goncharov wrote:
> Jean-Sebastien Stoezel wrote:
>> Thanks for the quick reply. Using conditon variables sounds quite
>> heavy. You need to instantiate a mutex, a condition variable and a
>> Would there be anything wrong with instantiating a semaphore from
>> the interprocess library to provide inter-thread synchronization?
> You can use a semaphore from the interprocess library to provide
> inter-thread synchronization.
> An interprocess semaphore is a thin wrapper around a posix semaphore
> if BOOST_INTERPROCESS_POSIX_SEMAPHORES is defined.
> Otherwise, a semaphore is emulated with a mutex and a condvar.
>> By the way, why isn't there any semaphore available in the thread
> The boost.Crypto library is going to provide some.
> BR, Dmitry
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk