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

Ensure IServiceBroker is used on a background thread #48122

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

sharwell
Copy link
Member

Expands #47903 to other calls to GetProxyAsync.

Expands dotnet#47903 to other calls to GetProxyAsync.
@sharwell sharwell requested a review from a team as a code owner September 28, 2020 17:18
@sharwell
Copy link
Member Author

@tmat @CyrusNajmabadi @jinujoseph roslyn-integration-CI caught this error in the OOP testing legs, but those legs have been disabled so no one saw it.

@jasonmalinowski
Copy link
Member

@sharwell What's the background here as far as why this is necessary? Do we have a writeup for the team guidance here?

@sharwell sharwell changed the base branch from master to release/dev16.8 September 28, 2020 17:35
@sharwell
Copy link
Member Author

@jasonmalinowski See #47903 for background. This is the same issue.

@jasonmalinowski
Copy link
Member

@sharwell, I did, hence my request for an explanation. 😄

@sharwell
Copy link
Member Author

The official guidance is to follow the three threading rules. Code which does so will avoid runtime deadlocks. Roslyn intentionally does not follow these rules, opting instead to mitigate observed deadlocks on an as-needed basis using different strategies based on the type of thread dependency that led to the deadlock. The strategy employed here is the manual mitigation strategy for a UI thread dependency introduced by external code using ConfigureAwait(true) (explicitly or implicitly).

@sharwell sharwell merged commit 96749e4 into dotnet:release/dev16.8 Sep 29, 2020
@sharwell sharwell deleted the background-thread branch September 29, 2020 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants