Created on 2009-11-17.00:00:00 last changed 161 months ago
Proposed resolution:
Remove [thread.condition.condvarany]p18 and [thread.condition.condvarany]p27.
template <class Lock, class Rep, class Period> cv_status wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time);
18 Precondition: lock is locked by the calling thread, and either
no other thread is waiting on this condition_variable object orlock.mutex() returns the same value for each of the lock arguments supplied by all concurrently waiting (via wait, wait_for, or wait_until) threads....
template <class Lock, class Rep, class Period, class Predicate> bool wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time, Predicate pred);
27 Precondition: lock is locked by the calling thread, and either
no other thread is waiting on this condition_variable object orlock.mutex() returns the same value for each of the lock arguments supplied by all concurrently waiting (via wait, wait_for, or wait_until) threads.
[ 2009-12-24 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
[thread.condition.condvarany]p18 and [thread.condition.condvarany]p27 specify incorrect preconditions for condition_variable_any::wait_for. The stated preconditions require that lock has a mutex() member function, and that this produces the same result for all concurrent calls to wait_for(). This is inconsistent with wait() and wait_until() which do not impose such a requirement.
History | |||
---|---|---|---|
Date | User | Action | Args |
2011-08-23 20:07:26 | admin | set | status: wp -> c++11 |
2010-10-21 18:28:33 | admin | set | messages: + msg1372 |
2010-10-21 18:28:33 | admin | set | messages: + msg1371 |
2009-11-17 00:00:00 | admin | create |