promise::set_value
and future::get
Section: 32.10.6 [futures.promise] Status: Resolved Submitter: INCITS Opened: 2010-08-25 Last modified: 2016-01-28
Priority: Not Prioritized
View other active issues in [futures.promise].
View all other issues in [futures.promise].
View all issues with Resolved status.
Discussion:
Addresses US-197
There is no defined synchronization between promise::set_value
and future::get
(32.10.6 [futures.promise] p. 21, 25).
[ Resolution proposed by ballot comment: ]
Replace "[Note: and they synchronize and serialize with other functions through the referred associated asynchronous state. — end note]" with the normative "They synchronize with (1.10) any operation on a future object with the same associated asynchronous state marked ready."
[ 2010-11-02 Daniel translates proposal into proper wording changes ]
[2011-03-19: Detlef comments]
The proposed resolution for 1507 would cover this issue as well. Effectively it will reject the request but a clarification is added that the normative wording is already in 32.10.5 [futures.state].
- Change 32.10.6 [futures.promise] p. 21 as indicated:
21 Synchronization: calls to
set_value
andset_exception
on a singlepromise
object are serialized.[ Note: and they synchronize and serialize with other functions through the referred associated asynchronous state. — end note ]They synchronize with ([intro.multithread]) any operation on a future object with the same associated asynchronous state marked ready.- Change 32.10.6 [futures.promise] p. 25 as indicated:
25 Synchronization: calls to
set_value
andset_exception
on a singlepromise
object are serialized.[ Note: and they synchronize and serialize with other functions through the referred associated asynchronous state. — end note ]They synchronize with ([intro.multithread]) any operation on a future object with the same associated asynchronous state marked ready.
Proposed resolution:
Resolved 2001-03 Madrid by issue 1507.