forked from OneGet/oneget
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deadlock when getting parameters in an event
When getting dynamic parameters from a thread other than the pipeline thread, the call to CommandInfo.Parameters internally tries to get back to it using the PowerShell EventManager. If dynamic parameters are being obtained from an event that is being processed by the EventManager then a deadlock will occur. This change routes the call to CommandInfo.Parameters to the main thread using AsyncCmdlet.ExecuteOnMainThread, bypassing the EventManager.
- Loading branch information
1 parent
03185db
commit 615c540
Showing
1 changed file
with
23 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters