Allow us to dispose batches asynchronously#53768
Merged
jasonmalinowski merged 4 commits intodotnet:mainfrom Oct 14, 2021
Merged
Allow us to dispose batches asynchronously#53768jasonmalinowski merged 4 commits intodotnet:mainfrom
jasonmalinowski merged 4 commits intodotnet:mainfrom
Conversation
4203dce to
664b412
Compare
7f3b435 to
5f92e29
Compare
ryzngard
reviewed
Oct 1, 2021
src/VisualStudio/Core/Def/Implementation/ProjectSystem/VisualStudioProject.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/Core/Def/Implementation/ProjectSystem/CPS/IWorkspaceProjectContext.cs
Show resolved
Hide resolved
src/VisualStudio/Core/Impl/ProjectSystem/CPS/CPSProject_IWorkspaceProjectContext.cs
Show resolved
Hide resolved
Member
Author
|
@ryzngard @CyrusNajmabadi Feedback addressed. |
src/VisualStudio/Core/Def/Implementation/ProjectSystem/CPS/IWorkspaceProjectContext.cs
Show resolved
Hide resolved
CyrusNajmabadi
approved these changes
Oct 13, 2021
This will allow us to make some methods asynchronous.
This will allow us to move some stuff to be more async; this commit however is entirely mechanical. We have to refactor a bit because the Monitor locks did allow for us to re-enter, but we won't be able to do that with SemaphoreSlim.
When the project system is loading a lot of projects at once, we can end up with a bunch of threads all contending for the main VisualStudioWorkspace lock, since we ultimately acquire the singleton lock once we're updating CurrentSolution. This allows us to be async so we aren't blocking up a bunch of thread pool threads.
94057a0 to
db70b30
Compare
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
Sign up for free
to 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.
When the project system is loading a lot of projects at once, we can end up with a bunch of threads all contending for the main VisualStudioWorkspace lock, since we ultimately acquire the singleton lock once we're updating CurrentSolution. This allows us to be async so we aren't blocking up a bunch of thread pool threads.