Title
condition_variable wording
Status
c++11
Section
[thread.condition.condvar]
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:

Modify [thread.condition.condvar]p4 as follows:

~condition_variable();

4 Precondition: There shall be no thread blocked on *this. [Note: That is, all threads shall have been notified; they may subsequently block on the lock specified in the wait. Beware that destroying a condition_variable object while the corresponding predicate is false is likely to lead to undefined behavior. The user must take care to ensure that no threads wait on *this once the destructor has been started, especially when the waiting threads are calling the wait functions in a loop or using the overloads of wait, wait_for or wait_until that take a predicate.end note]

Date: 2010-02-12.00:00:00

[ 2010-02-12 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]

Date: 2010-02-11.00:00:00

[ 2010-02-11 Anthony provided wording. ]

Date: 2009-09-30.00:00:00

[thread.condition.condvar] says:

~condition_variable();

Precondition: There shall be no thread blocked on *this. [Note: That is, all threads shall have been notified; they may subsequently block on the lock specified in the wait. Beware that destroying a condition_variable object while the corresponding predicate is false is likely to lead to undefined behavior. — end note]

The text hasn't introduced the notion of a "corresponding predicate" yet.

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