Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Description for bullet 5.1 in section [expr.await] #4568

Closed
xmh0511 opened this issue Mar 31, 2021 · 1 comment · Fixed by #4589
Closed

Description for bullet 5.1 in section [expr.await] #4568

xmh0511 opened this issue Mar 31, 2021 · 1 comment · Fixed by #4589
Assignees

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Mar 31, 2021

In bullet 5.1, the rule for evaluating await-suspend that throws an exception is

If the evaluation of await-suspend exits via an exception, the exception is caught, the coroutine is resumed, and the exception is immediately re-thrown ([except.throw]).

It says that the coroutine is resumed, however resume a coroutine will evaluate the await-resume for that co-await expression, which is stated in bullet 5.2

If the result of await-ready is true, or when the coroutine is resumed, the await-resume expression is evaluated, and its result is the result of the await-expression.

But in most major implementations, evaluating the await-suspend for an await-expression that throws an exception does not continue to evaluate await-resume for the expression. It is a bit vague in the first bullet above. Is it necessary to state that in this case, the await-resume for that expression does not evaluate anymore?

@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Apr 2, 2021
@jensmaurer
Copy link
Member

Editorial meeting 2021-04-16: That's why we say "immediately"; the await-resume expression isn't actually evaluated. Amend second quote to say "... other than by rethrowing an exception from await-suspend".

@jensmaurer jensmaurer removed the decision-required A decision of the editorial group (or the Project Editor) is required. label Apr 16, 2021
@jensmaurer jensmaurer self-assigned this Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants