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

Try really hard to avoid deadlocking GetService calls #1597

Closed
wants to merge 2 commits into from

Conversation

@shana
Copy link
Collaborator

@shana shana commented Apr 12, 2018

new ShellSettingsManager in the PackageSettings constructor calls GetService, which might be a potential deadlock situation. Also, to avoid calls to GetService that might deadlock, cache the services we create in GitHubServiceProvider so that it returns cached instances immediately and bypasses GetService.

I also fixed some other calls around the code, particularly direct calls to ExportProvider (GitHubServiceProvider.TryGetService does that for us)

`new ShellSettingsManager` in the PackageSettings constructor
calls GetService, which might be a potential deadlock situation.
Also, to avoid calls to GetService that might deadlock, cache
the services we create in GitHubServiceProvider so that it returns
cached instances immediately and bypasses GetService.
@shana shana requested review from grokys and jcansdale Apr 12, 2018
@meaghanlewis meaghanlewis added this to In progress in 2.4.4 Apr 13, 2018
@meaghanlewis meaghanlewis added this to In progress in 2.5.2 Apr 19, 2018
@meaghanlewis meaghanlewis removed this from In progress in 2.5.2 May 17, 2018
@jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Mar 10, 2020

Too many conflicts. 😉

@jcansdale jcansdale closed this Mar 10, 2020
@jcansdale jcansdale deleted the fixes/get-service-deadlock branch Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2.4.4
  
In progress
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.