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

yield return AsyncActions.WaitForTask #12

Open
bgrainger opened this issue Dec 30, 2018 · 0 comments
Open

yield return AsyncActions.WaitForTask #12

bgrainger opened this issue Dec 30, 2018 · 0 comments
Labels
new analyzer Suggestion for a new analyzer to add

Comments

@bgrainger
Copy link
Member

yield return AsyncActions.WaitForTask does not automatically propagate exceptions from the waited-for Task. Although in some cases, the Task is saved in a local variable and its .Result property is accessed (which will throw any saved exceptions), for consistency it seems better to never allow yield return AsyncActions.WaitForTask but instead save the action in a local variable, yield return that, then call .Verify or .Result on the action.

@bgrainger bgrainger added the new analyzer Suggestion for a new analyzer to add label Dec 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new analyzer Suggestion for a new analyzer to add
Development

No branches or pull requests

1 participant