Title
Various threading bugs #12
Status
c++11
Section
[thread.lock.unique.locking]
Submitter
Pete Becker

Created on 2009-01-07.00:00:00 last changed 162 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change Exceptions [thread.req.exception] as indicated:

Some functions described in this Clause are specified to throw exceptions of type system_error (19.5.5). Such exceptions shall be thrown if any of the Error conditions are detected or a call to an operating system or other underlying API results in an error that prevents the library function from satisfying its postconditions or from returning a meaningful value meeting its specifications. Failure to allocate storage shall be reported as described in [res.on.exception.handling].

Change thread assignment [thread.thread.member], join(), paragraph 8 as indicated:

Throws: std::system_error when the postconditions cannot be achieved an exception is required ([thread.req.exception]).

Change thread assignment [thread.thread.member], detach(), paragraph 13 as indicated:

Throws: std::system_error when the effects or postconditions cannot be achieved an exception is required ([thread.req.exception]).

Change Mutex requirements [thread.mutex.requirements], paragraph 11, as indicated:

Throws: std::system_error when the effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change unique_lock locking [thread.lock.unique.locking], paragraph 3, as indicated:

Throws: std::system_error when the postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change unique_lock locking [thread.lock.unique.locking], paragraph 8, as indicated:

Throws: std::system_error when the postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change unique_lock locking [thread.lock.unique.locking], paragraph 13, as indicated:

Throws: std::system_error when the postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change unique_lock locking [thread.lock.unique.locking], paragraph 18, as indicated:

Throws: std::system_error when the postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change unique_lock locking [thread.lock.unique.locking], paragraph 22, as indicated:

Throws: std::system_error when the postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change Function call_once [thread.once.callonce], paragraph 4, as indicated

Throws: std::system_error when the effects cannot be achieved an exception is required ([thread.req.exception]), or any exception thrown by func.

Change Class condition_variable [thread.condition.condvar], paragraph 12, as indicated:

Throws: std::system_error when the effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change Class condition_variable [thread.condition.condvar], paragraph 19, as indicated:

Throws: std::system_error when the effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change Class condition_variable_any [thread.condition.condvarany], paragraph 10, as indicated:

Throws: std::system_error when the effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Change Class condition_variable_any [thread.condition.condvarany], paragraph 16, as indicated:

Throws: std::system_error when the returned value, effects, or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Assuming issue 859, Monotonic Clock is Conditionally Supported?, has been applied to the working paper, change Change [thread.condition.condvar] as indicated:

template <class Rep, class Period> 
bool wait_for(unique_lock<mutex>& lock, 
              const chrono::duration<Rep, Period>& rel_time);
...

Throws: std::system_error when the effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Assuming issue 859, Monotonic Clock is Conditionally Supported?, has been applied to the working paper, change Change [thread.condition.condvar] as indicated:

template <class Rep, class Period, class Predicate> 
  bool wait_for(unique_lock<mutex>& lock, 
                const chrono::duration<Rep, Period>& rel_time, 
                Predicate pred);
...

Throws: std::system_error when the effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Assuming issue 859, Monotonic Clock is Conditionally Supported?, has been applied to the working paper, change [thread.condition.condvarany] as indicated:

template <class Lock, class Rep, class Period> 
  bool wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time);
...

Throws: std::system_error when the returned value, effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Assuming issue 859, Monotonic Clock is Conditionally Supported?, has been applied to the working paper, change [thread.condition.condvarany] as indicated:

template <class Lock, class Rep, class Period, class Predicate> 
  bool wait_for(Lock& lock, const chrono::duration<Rep, Period>& rel_time, Predicate pred);
...

Throws: std::system_error when the returned value, effects or postcondition cannot be achieved an exception is required ([thread.req.exception]).

Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Move to Ready.

Date: 2009-09-25.00:00:00

[ 2009-09-25 Beman: minor update to wording. ]

Date: 2009-07-21.00:00:00

[ 2009-07-21 Beman added wording to address [thread.req.exception] in response to the Frankfurt notes in 859. ]

Date: 2010-10-21.18:28:33

[ Beman has volunteered to provide proposed wording. ]

Date: 2010-10-21.18:28:33

[ Summit: ]

Move to open.

Date: 2009-01-07.00:00:00

[thread.lock.unique.locking]: unique_lock::lock is required to throw an object of type std::system_error "when the postcondition cannot be achieved." The postcondition is owns == true, and this is trivial to achieve. Presumably, the requirement is intended to mean something more than that.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg4583
2010-10-21 18:28:33adminsetmessages: + msg4582
2010-10-21 18:28:33adminsetmessages: + msg4581
2010-10-21 18:28:33adminsetmessages: + msg4580
2010-10-21 18:28:33adminsetmessages: + msg4579
2010-10-21 18:28:33adminsetmessages: + msg4578
2009-01-07 00:00:00admincreate