Skip to content

Lock calls around Test-ModuleManifest, which is not thread safe - #1258

Merged
Christoph Bergmeister (bergmeister) merged 1 commit into
PowerShell:developmentfrom
bergmeister:LockTestModuleManifest
Jun 12, 2019
Merged

Lock calls around Test-ModuleManifest, which is not thread safe#1258
Christoph Bergmeister (bergmeister) merged 1 commit into
PowerShell:developmentfrom
bergmeister:LockTestModuleManifest

Conversation

@bergmeister

@bergmeisterChristoph Bergmeister (bergmeister) commented Jun 10, 2019

Copy link
Copy Markdown
Collaborator

PR Summary

This is an alternative, better implementation, compared to PR #1257
Basically the issues below show that Test-ModuleManifest exhibits a concurreny problem in all version of PowerShell and it is not clear yet if that is an issue of the cmdlet itself or something deep within SMA. But as a matter of fact, the only way to avoid it at the moment, is not avoid concurrent calls to Test-ModuleManifest.
Please use a whitespace-ignoring diff due to the indentation shift.

Fixes#901
Fixes#902

PR Checklist

@rjmholtRob Holt (rjmholt) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good.

You may also find that the PSModuleInfo object itself isn't threadsafe, but I'm not sure.

@bergmeisterChristoph Bergmeister (bergmeister) changed the title Lock calls around Test-ModuleManifest, which is not thread safe (better alternative to PR #1257)Lock calls around Test-ModuleManifest, which is not thread safeJun 12, 2019
@bergmeister
Christoph Bergmeister (bergmeister) merged commit b09eb33 into PowerShell:developmentJun 12, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

2 participants

@bergmeister@rjmholt