Skip to content

Allow us to dispose batches asynchronously#53768

Merged
jasonmalinowski merged 4 commits intodotnet:mainfrom
jasonmalinowski:allow-async-batch-application
Oct 14, 2021
Merged

Allow us to dispose batches asynchronously#53768
jasonmalinowski merged 4 commits intodotnet:mainfrom
jasonmalinowski:allow-async-batch-application

Conversation

@jasonmalinowski
Copy link
Copy Markdown
Member

@jasonmalinowski jasonmalinowski commented May 29, 2021

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.

@jasonmalinowski jasonmalinowski self-assigned this May 29, 2021
@ghost ghost added the Area-IDE label May 29, 2021
@jasonmalinowski jasonmalinowski force-pushed the allow-async-batch-application branch 6 times, most recently from 4203dce to 664b412 Compare September 30, 2021 03:30
@jasonmalinowski jasonmalinowski force-pushed the allow-async-batch-application branch 2 times, most recently from 7f3b435 to 5f92e29 Compare October 1, 2021 22:34
@jasonmalinowski jasonmalinowski marked this pull request as ready for review October 1, 2021 22:35
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner October 1, 2021 22:35
@jasonmalinowski
Copy link
Copy Markdown
Member Author

@ryzngard @CyrusNajmabadi Feedback addressed.

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.
@jasonmalinowski jasonmalinowski force-pushed the allow-async-batch-application branch from 94057a0 to db70b30 Compare October 13, 2021 19:05
@jasonmalinowski jasonmalinowski merged commit 4e381be into dotnet:main Oct 14, 2021
@ghost ghost added this to the Next milestone Oct 14, 2021
@jasonmalinowski jasonmalinowski deleted the allow-async-batch-application branch October 15, 2021 00:50
@RikkiGibson RikkiGibson removed this from the Next milestone Oct 25, 2021
@RikkiGibson RikkiGibson added this to the 17.1.P1 milestone Oct 25, 2021
RikkiGibson added a commit to RikkiGibson/roslyn that referenced this pull request Oct 27, 2021
…ync-batch-application"

This reverts commit 4e381be, reversing
changes made to 241ed70.
RikkiGibson added a commit that referenced this pull request Oct 27, 2021
…tch-application"

This reverts commit 4e381be, reversing
changes made to 241ed70.
RikkiGibson added a commit that referenced this pull request Oct 27, 2021
…tch-application"

This reverts commit 4e381be, reversing
changes made to 241ed70.
RikkiGibson added a commit that referenced this pull request Oct 27, 2021
…tch-application" (#57405)

This reverts commit 4e381be, reversing
changes made to 241ed70.
@jasonmalinowski jasonmalinowski restored the allow-async-batch-application branch October 27, 2021 18:54
@jasonmalinowski jasonmalinowski deleted the allow-async-batch-application branch October 27, 2021 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants