Title
Throw specification of async() incomplete
Status
c++14
Section
[futures.async]
Submitter
Nicolai Josuttis

Created on 2011-08-29.00:00:00 last changed 123 months ago

Messages

Date: 2013-09-29.16:53:12

Proposed resolution:

This wording is relative to N3691.

  1. Change [futures.async] p6, p7 as indicated:

    -6- Throws: system_error if policy is == launch::async and the implementation is unable to start a new thread.

    -7- Error conditions:

    • resource_unavailable_try_again — if policy is == launch::async and the system is unable to start a new thread.

Date: 2013-09-29.16:53:12

[ 2013-09 Chicago ]

If all the implementors read it and can't get it right - it is not editorial. Nico to provide wording

No objections to revised wording, so moved to Immediate.

Accept for Working Paper

Date: 2012-11-02.22:48:46

[ 2012, Portland: move to Tentatively NAD Editorial ]

If no launch policy, it is undefined behavior.

Agree with Lawrence, should try all the allowed policies. We will rephrase so that the policy argument should be lauch::async. Current wording seems good enough.

We believe this choice of policy statement is really an editorial issue.

Date: 2011-08-29.00:00:00

The current throw specification of async() does state:

-6- Throws: system_error if policy is launch::async and the implementation is unable to start a new thread.

First it seems not clear whether this only applies if policy equals launch::async of if the async launch mode flag is set (if policy|launch::async!=0)

In the discussion Lawrence Crowl also wrote:

More generally, I think what we want to say is that if the implementation cannot successfully execute on one of the policies allowed, then it must choose another. The principle would apply to implementation-defined policies as well.

Peter Sommerlad:

Should not throw. That was the intent. "is async" meat exactly.

History
Date User Action Args
2014-02-20 13:20:35adminsetstatus: wp -> c++14
2013-09-29 16:53:12adminsetmessages: + msg6665
2013-09-29 16:53:12adminsetmessages: + msg6664
2013-09-29 16:53:12adminsetstatus: nad editorial -> wp
2012-11-02 22:48:46adminsetmessages: + msg6235
2012-11-02 22:48:46adminsetstatus: new -> nad editorial
2011-08-29 00:00:00admincreate