Title
condition_variable incorrect effects for exception safety
Status
c++11
Section
[thread.condition]
Submitter
Jeffrey Yasskin

Created on 2009-09-30.00:00:00 last changed 154 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [thread.condition.condvar] p10:

void wait(unique_lock<mutex>& lock);

...

Effects:

  • ...
  • If the function exits via an exception, lock.unlock() shall be called prior to exiting the function scope.

And make a similar change in p16, and in [thread.condition.condvarany], p8 and p13.

Date: 2009-11-17.00:00:00

[ 2009-11-17 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]

Date: 2009-09-30.00:00:00

[thread.condition.condvar] says:

void wait(unique_lock<mutex>& lock);

...

Effects:

  • ...
  • If the function exits via an exception, lock.unlock() shall be called prior to exiting the function scope.

Should that be lock.lock()?

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg1207
2010-10-21 18:28:33adminsetmessages: + msg1206
2009-09-30 00:00:00admincreate