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

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

Messages

Date: 2011-03-24.21:43:06

Proposed resolution:

  1. Change the first bullet item in [futures.task.members] p. 17:

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

    15 ...

    16 ...

    17 Error conditions:

    • promise_already_satisfied if the associated asynchronous state is already readystored task has already been invoked.
    • no_state if *this has no associated asynchronous state.
  2. Change the first bullet item in [futures.task.members] p. 21:

    void make_ready_at_thread_exit(ArgTypes... args);
    

    19 ...

    20 ...

    21 Error conditions:

    • promise_already_satisfied if the associated asynchronous state already has a stored value or exceptionstored task has already been invoked.
    • no_state if *this has no associated asynchronous state.
Date: 2011-03-24.21:43:06

[ Adopted at Madrid, 2011-03 ]

Date: 2011-02-17.00:00:00

[ 2011-02-17 Anthony provides an alternative resolution ]

Previous 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
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2011-04-11 11:23:23adminsetstatus: immediate -> wp
2011-03-24 21:43:06adminsetmessages: + msg5707
2011-03-24 21:43:06adminsetstatus: new -> immediate
2011-02-17 18:45:24adminsetmessages: + msg5501
2010-11-07 17:36:56adminsetmessages: + msg5299
2010-06-21 00:00:00admincreate