28 Mar
2011
28 Mar
'11
10:20 p.m.
AMDG On 03/28/2011 03:03 PM, Panagiotis Foteinos wrote:
Hello users.
Documentation says that cond.wait(mtx) blocks the current thread and invokes mtx.unlock().
What if I want cond.wait(mtx) to call mtx.unlock_shared() instead? Is there any way to do so?
You should pass the unique_lock or shared_lock to cond.wait, instead of passing the mutex itself. In Christ, Steven Watanabe