GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing github.com — Thread-safe `HttpKnownHeaderNames` initialization by iSazonov · Pull Request #15519 · PowerShell/PowerShell Conversation
|
|
Even with this, the hashset will still be accessed from multiple threads concurrently in the cases given in #15513, won't it? We should probably add a test using the code samples in the issue to verify that this is sufficient to resolve it. Since the user reporting it mentioned that it was a bit intermittent, we should repeat their test a few times in our own tests. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
A root of the issue was that second thread read the HashSet while first thread still initializes the HashSet.
It's not worth it. We will not be able to make such tests stable and defensible. Please use compiled artifact to check locally. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
If the only writes are the ones when the object is generated : I think the write race condition is eliminated with this change. I am a C# dev, but I have zero knowledge on the Powershell source code. Hope I could help you somehow. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
dperez83 PowerShell is great project to improve skills. It's too big to learn it well in a short time but you can pick an area you like best and work there with some workgroup https://devblogs.microsoft.com/powershell/powershell-working-groups/
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Dongbo Wang (@daxian-dbw) Could you please review? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Steve Lee (@SteveL-MSFT) Could you please approve? It is impossible to merge without green flag :-) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I see that there's a pending review from Dongbo Wang (@daxian-dbw) Thank you |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Travis Plunk (@TravisEz13) Please review/approve. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if (s_contentHeaderSet == null) | ||
| { | ||
| s_contentHeaderSet = new HashSet<string>(StringComparer.OrdinalIgnoreCase); | ||
| // Thread-safe initialization. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| // Thread-safe initialization. | |
| // Thread-safe initialization because the constructor is only called once per AppDomain. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
HttpKnownHeaderNames initialization
|
🎉 Handy links: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
🎉 Handy links: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Invoke-RestMethod parallel problem
There was an error while loading. Please reload this page.