Title
What should async do if neither 'async' nor 'deferred' is set in policy?
Status
c++14
Section
[futures.async]
Submitter
Jonathan Wakely

Created on 2012-01-01.00:00:00 last changed 131 months ago

Messages

Date: 2013-09-29.16:53:12

[ This wording is relative to N3485 ]

Add a third bullet to the end of the list in [futures.async]p3

– If no value is set in the launch policy, or a value is set that is neither specified in this International Standard or by the implementation, the behaviour is undefined.
Date: 2013-09-29.16:53:12

[ 2013-09 Chicago ]

If no policy is given, it should be undefined, so moved to Immediate.

Accept for Working Paper

Date: 2013-04-15.00:00:00

[ 2013-04-19, Bristol ]

Detlef provides new wording

Previous wording:

This wording is relative to N3376

Add a third bullet to the end of the list in [futures.async]p3

– if no valid launch policy is provided the behaviour is undefined
Date: 2012-11-02.22:48:46

[ Proposed wording ]

This wording is relative to N3376

Add a third bullet to the end of the list in 30.6.8p3

"if no valid launch policy is provided the behaviour is undefined"

Moved to review

Date: 2012-11-02.22:48:46

[ 2012, Portland: move to Review ]

We could make it undefined if no launch policy is defined.

Hans: If no launch policy is specified the behaviour is undefined

Artur: or implementation defined?

Hans: no: we don't want people to do this

Date: 2012-01-14.12:19:40

Implementations already disagree, one returns an invalid future with no shared state, one chooses policy == async and one chooses policy == deferred, see c++std-lib-30839, c++std-lib-30840 and c++std-lib-30844. It's not clear if returning an invalid future is allowed by the current wording.

If the intention is to allow an empty future to be returned, then [futures.async] p3 and p4 should be adjusted to clarify that a shared state might not be created and an invalid future might be returned.

If the intention is that a valid future is always returned, p3 should say something about the case where none of the conditions applies.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-09-29 16:53:12adminsetmessages: + msg6666
2013-09-29 16:53:12adminsetstatus: review -> wp
2013-04-19 21:44:50adminsetmessages: + msg6468
2012-11-02 22:48:46adminsetmessages: + msg6242
2012-11-02 22:48:46adminsetmessages: + msg6241
2012-11-02 22:48:46adminsetmessages: + msg6240
2012-11-02 22:48:46adminsetstatus: new -> review
2012-01-01 00:00:00admincreate