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

Fix spinwaiting in LockFreeReaderHashtable #55082

Merged
merged 1 commit into from
Jul 2, 2021
Merged

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jul 2, 2021

Task.Delay(1).Wait() is variant of sync-over-async anti-patern. It does not work well with threadpool used to run parallel AOT compilation. It can lead to too many threadpool threads getting created and progress slowing down to crawl, at least temporarily.

Task.Delay(1).Wait() is variant of sync-over-async anti-patern. It does not work well with threadpool used to run parallel AOT compilation. It can lead to too many threadpool threads getting created and progress slowing down to crawl, at least temporarily.
@jkotas
Copy link
Member Author

jkotas commented Jul 2, 2021

Found in dotnet/runtimelab#1265. The CI jobs were timing out intermittently after .NET 6 upgrade without this fix.

@jkotas jkotas requested a review from davidwrighton July 2, 2021 14:39
@jkotas jkotas merged commit e8572d3 into dotnet:main Jul 2, 2021
@jkotas jkotas deleted the fixspinwait branch July 2, 2021 19:32
@ghost ghost locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants