Boost logo

Boost :

Subject: Re: [boost] Lock free condition_variable or using shared_lock
From: Bjorn Reese (breese_at_[hidden])
Date: 2014-07-30 10:02:50


On 07/30/2014 04:57 AM, Kirk Liberty wrote:

> Is it possible to modify condition_variable so that wait() can be called on
> shared_lock? The use case would be it is acceptable to release all threads

Use condition_variable_any.

> waiting on a condition_variable when notify_all() is called. Using a
> unique_lock, every thread who wakes up will then have to obtain the lock
> before proceeding; this being a potential bottleneck.

This is also the case for shared_lock.


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