Skip to content

Fix for hang issue #481

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

Merged
merged 1 commit into from
Mar 29, 2016
Merged

Fix for hang issue #481

merged 1 commit into from
Mar 29, 2016

Conversation

raghushantha
Copy link
Member

PowerShell GetCommandInfo hangs when used in a multi threaded environment (with the same Runspace)

Fix is to put a lock around the usage.


This change is Reviewable

@daviwil
Copy link
Contributor

daviwil commented Mar 29, 2016

Interesting, was this showing up in a particular rule? I wonder if this is why Script Analyzer was hanging in VS Code when I had all of the rules active?

@raghushantha
Copy link
Member Author

Not specific to a single rule.
System.Management.Automation.CommandInvocationIntrinsics.GetCommand () would hang when multiple rules called this in a concurrent manner.

We were invoking this helper to discover commandinfo properties.

Need to followup with PowerShell team.


Comments from the review on Reviewable.io

@kapilmb
Copy link

kapilmb commented Mar 29, 2016

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from the review on Reviewable.io

@kapilmb
Copy link

kapilmb commented Mar 29, 2016

:lgtm:


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from the review on Reviewable.io

@raghushantha raghushantha merged commit 890cd12 into development Mar 29, 2016
@raghushantha raghushantha deleted the HangIssueFixBranch branch March 29, 2016 19:44
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.

4 participants