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

Delete unnecessary code around Workspace eventing #33368

Conversation

jasonmalinowski
Copy link
Member

We had some code in the VS layer that was trying to work around the fact that we might be MEF created on a background thread, when were didn't know what the UI thread was. It tried to assert that the first actual workspace mutation would happen on the UI thread, and so it was safe to create the queue at that point. This is silly now for two reasons:

  1. We're using the IThreadingContext which knows what the main thread is directly and without any ceremony
  2. We now do indeed do workspace mutations on other threads. It's still the case that the first mutation is on the UI thread today but that's a limitation we are actively wanting to excise.

We had some code in the VS layer that was trying to work around the
fact that we might be MEF created on a background thread, when were
didn't know what the UI thread was. It tried to assert that the first
actual workspace mutation would happen on the UI thread, and so it was
safe to create the queue at that point. This is silly now for two
reasons:

1. We're using the IThreadingContext which knows what the main thread
   is directly and without any ceremony
2. We now do indeed do workspace mutations on other threads. It's still
   the case that the first mutation is on the UI thread today but that's
   a limitation we are actively wanting to excise.
@jasonmalinowski jasonmalinowski requested a review from a team as a code owner February 13, 2019 23:02
Copy link
Member

@JoeRobich JoeRobich left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jinujoseph jinujoseph added this to the 16.1.P1 milestone Feb 14, 2019
@jasonmalinowski jasonmalinowski merged commit af832ba into dotnet:master Feb 15, 2019
@jasonmalinowski jasonmalinowski deleted the delete-unnecessary-code-around-workspace-eventing branch February 15, 2019 18:42
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi left a comment

Choose a reason for hiding this comment

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

👍

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