-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove TaskQueue and SafeContinueWith extensions #76459
Remove TaskQueue and SafeContinueWith extensions #76459
Conversation
@jasonmalinowski @JoeRobich @sharwell @dotnet/roslyn-ide ptal. |
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.
One small concern about the "UnlessCancelled" variant but nothing that blocks.
{ | ||
foreach (var item in list) | ||
{ | ||
cancellationToken.ThrowIfCancellationRequested(); |
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.
This cancellation could change behavior here -- before Workspace events would be queued and would continue, at least until the termination of the process. If that cancellation triggers at some earlier point now it might mean people won't get events. Practically, this would only matter during shutdown, and since we were queuing to the UI thread there was already a pretty good chance those might never fire -- there's really no difference between "we cancelled them and they never ran during shutdown" versus "the UI thread was never available during shutdown to run them anyways".
This is probably a small win for shutdown perf; but if we see any strange bugs appear during shutdown this might be a place to investigate. Probably good to see if it's fine, at least!
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.
yup. i'm very ok with this behavior. you dispose of the workspace, and outstanding work may not happen.
{ | ||
item(); | ||
} | ||
catch (Exception e) when (FatalError.ReportAndCatchUnlessCanceled(e)) |
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.
Not sure why the "UnlessCancelled" here -- I wouldn't expect cancellation from the action since we never gave it a token.
Fixes #44150
Fixes #47891
Followup to #76455