Boost logo

Boost :

Subject: Re: [boost] [thread] semaphore
From: Jonathan Wakely (jwakely.boost_at_[hidden])
Date: 2013-09-18 12:33:50


On 18 September 2013 17:28, Gottlob Frege wrote:
> But it still doesn't make it easy to use. It might have been easier to
> somehow wrap the lock and CV together (and a lambda for the condition?) and
> tell people to make sure they also lock the same CV+lock thing when
> pushing/pulling from the queue.

I think the problem with wrapping them together is that the binding of
the three things is dynamic, not static. It's OK to use the same CV
with different mutexes (as long as no waits using different mutexes
ever overlap) although doing so correctly can be tricky :)


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