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

Move open/closed document checks under the _serializationLock #33435

Conversation

jasonmalinowski
Copy link
Member

These not being under the lock would mean parallel calls to OnDocumentOpened/Closed might race against each other. We don't think this is a practical problem as current callers are already taking their own locks or are affinitized to the UI thread, but it would be good to fix nonetheless.

These not being under the lock would mean parallel calls to
OnDocumentOpened/Closed might race against each other. We don't think
this is a practical problem as current callers are already taking their
own locks or are affinitized to the UI thread, but it would be good to
fix nonetheless.
@jasonmalinowski jasonmalinowski self-assigned this Feb 15, 2019
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner February 15, 2019 22:48
Copy link
Member

@genlu genlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Previously opened additional documents weren't counted as open in
Workspace.IsDocumentOpen, but after
dotnet#33165 we can now properly do this
check.
@jasonmalinowski jasonmalinowski merged commit f95a73f into dotnet:master Feb 20, 2019
@jasonmalinowski jasonmalinowski deleted the move-checks-inside-serialization-lock branch February 20, 2019 18:31
@KirillOsenkov
Copy link
Member

❤️ we think this might have fixed a race condition that was driving us insane on VSMac

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.

6 participants