Title
Conflicting Error Conditions for packaged_task::operator()
Status
new
Section
[futures.task.members]
Submitter
Pete Becker

Created on 2010-06-21.00:00:00 last changed 163 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change the first bullet item in [futures.task.members] /22:

void operator()(ArgTypes... args);

20 ...

21 ...

22 Error conditions:

  • promise_already_satisfied if the associated asynchronous state is already ready operator() has already been called.
  • no_state if *this has no associated asynchronous state.
Date: 2010-06-21.00:00:00

The Throws clause for packaged_task::operator() says that it throws "a future_error exception object if there is no associated asynchronous state or the stored task has already been invoked." However, the Error Conditions clause does not define an error condition when the stored task has already been invoked, only when the associated state is already ready (i.e. the invocation has completed).

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg1628
2010-06-21 00:00:00admincreate