- Notifications
You must be signed in to change notification settings - Fork4.1k
Remove most remaining workspace changed on UI thread#79391
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Draft
jasonmalinowski wants to merge5 commits intodotnet:mainChoose a base branch fromjasonmalinowski:remove-most-remaining-workspace-changed-on-ui-thread
base:main
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Remove most remaining workspace changed on UI thread#79391
jasonmalinowski wants to merge5 commits intodotnet:mainfromjasonmalinowski:remove-most-remaining-workspace-changed-on-ui-thread
+14 −32
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6c0511b
to7e62a44
CompareAll subscribers are working in thread-safe manners (they either takelocks to clear caches, or use existing batching/threading primitives toqueue new work).
Subscribers were already thread safe. I've also removed the IMPORTANTwarning since it seems quite stale -- this is already in a delayed queueso it's not really clear what it meant.
I'm unable to figure out what the intent was here -- it clears the listbut only on a SolutionChanged event, which is the type of eventraised if multiple projects are modified at once in a single workspacechange -- any other type of event would have a more specific kind.I could imagine the intent might have been for solution close, butthen I can imagine scenarios where the user might have pasted a stackand now needs to switch the solution to navigate from the stack.Since this likely never ran, I'm just deleting it.
If the user expands a node in a CPS project wanting to look at thediagnostics under an analyzer, but we haven't been told about thatanalyzer let, we stick a WorkspaceChanged handler there to find it onceit comes back. We were hopping to the UI thread to see if theCanonicalName of the item could have changed, but that's not reallygoing to happen ever for these items, so we can just grab it onceduring creation and be done with it.
This looks to be safely callable from any thread.
7e62a44
to452703e
CompareSign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a reapply of#78778 that got reverted due to a potential regression.
Commit-at-a-time is recommended, since each use gets its own commit with further analysis there.
The remaining uses of eventing that hit the UI thread (of any kind of workspace event) are: