-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Avoid async void methods #74744
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
Avoid async void methods #74744
Conversation
| #pragma warning disable VSTHRD100 // Avoid async void methods | ||
| private async void StartRefreshingMetadataReferencesForFile(object? sender, string fullFilePath) | ||
| #pragma warning restore VSTHRD100 // Avoid async void methods | ||
| private void StartRefreshingMetadataReferencesForFile(object? sender, string fullFilePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
view with whitespace off.
| using var asyncToken = WorkspaceListener.BeginAsyncOperation(nameof(StartRefreshingMetadataReferencesForFile)); | ||
| var asyncToken = WorkspaceListener.BeginAsyncOperation(nameof(StartRefreshingMetadataReferencesForFile)); | ||
| var task = StartRefreshingMetadataReferencesForFileAsync(sender, fullFilePath); | ||
| task.CompletesAsyncOperation(asyncToken); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❔ Do we want to also add a telemetry handler here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm ok with this as is for now. unless there's a nice easy one we can hook up.
No description provided.