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

Raise VSTHRD002 on improper sync-blocking of configured awaiters #1355

Merged
merged 1 commit into from
Sep 23, 2024

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Sep 20, 2024

Closes #1354

@AArnott AArnott added this to the v17.12 milestone Sep 20, 2024
@AArnott AArnott marked this pull request as ready for review September 20, 2024 23:24
class Test {
void F() {
var task = Task.Run(() => 1);
task.ConfigureAwait(false).GetAwaiter().[|GetResult|]();
Copy link
Member

@BertanAygun BertanAygun Sep 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not familiar with [|..|] syntax? Is it specific to CSVerify to annotate the expected location of the warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's the much easier syntax to mark where the diagnostic is expected than what the prior tests use.

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick turn around on this one!

@AArnott AArnott merged commit d516ea9 into microsoft:main Sep 23, 2024
5 checks passed
@AArnott AArnott deleted the fix1354 branch September 23, 2024 22:04
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 this pull request may close these issues.

VSTHRD002 doesn't trigger when configure await is used
3 participants