Title
future::get should explicitly state that the shared state is released
Status
c++17
Section
[futures.unique.future]
Submitter
Agustín K-ballo Bergé

Created on 2015-09-03.00:00:00 last changed 89 months ago

Messages

Date: 2016-08-05.03:33:05

Proposed resolution:

This wording is relative to N4527.

  1. Modify [futures.unique_future] as indicated:

    R future::get();
    R& future<R&>::get();
    void future<void>::get();
    

    -14- Note: as described above, the template and its two required specializations differ only in the return type and return value of the member function get.

    -15- Effects:

    • wait()s until the shared state is ready, then retrieves the value stored in the shared state.;

    • releases any shared state ([futures.state]).

    […]

Date: 2016-08-05.03:33:05

[ 2016-08 - Chicago ]

Thurs AM: Moved to Tentatively Ready

Date: 2015-09-03.00:00:00

The standard is usually very explicit on when a shared state is released, except for future::get for which it only states valid() == false as a postcondition.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-11-14 03:59:28adminsetstatus: pending -> wp
2016-11-14 03:55:22adminsetstatus: ready -> pending
2016-08-05 03:33:05adminsetmessages: + msg8410
2016-08-05 03:33:05adminsetstatus: new -> ready
2015-09-09 19:25:56adminsetmessages: + msg7510
2015-09-03 00:00:00admincreate