Skip to content
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

Separate 1 Lock into 2 Mutexes/Locks for Data Management #1891

Merged
merged 7 commits into from
Jul 30, 2024

Conversation

nagilson
Copy link
Member

'installing' and 'installed' data that is stored in the extension state is preserved between runs. We allow concurrent requests. Sometimes, a request may come in while another request is currently processing. Therefore, we have a lock guard on the install request tracking, so for example, if two identical requests come in at the same time, there is no race condition where the request work gets duplicated.

The promise chain which stores currently in progress installs used to be held behind a lock as well but this doesn't make sense because it's a local data structure, operations on it should be atomic.

We can separate the lock shared for all of these things into 2 separate locks since their operations are discrete from one another to improve performance and stability.

build.ps1 Outdated Show resolved Hide resolved
@nagilson nagilson requested a review from a team July 23, 2024 23:18
@nagilson nagilson enabled auto-merge (squash) July 30, 2024 22:15
@nagilson nagilson disabled auto-merge July 30, 2024 22:44
@nagilson nagilson merged commit cfbbbee into dotnet:main Jul 30, 2024
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants