Skip to content

Fix spinwaiting in LockFreeReaderHashtable - #55082

Merged
jkotas merged 1 commit into
dotnet:mainfrom
jkotas:fixspinwait
Jul 2, 2021
Merged

jkotas merged 1 commit into
dotnet:mainfrom
jkotas:fixspinwait

Conversation

@jkotas

@jkotas jkotas commented Jul 2, 2021

Copy link
Copy Markdown
Member

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.
@ghost ghost added the area-ReadyToRun label Jul 2, 2021
@jkotas

jkotas commented Jul 2, 2021 •

Copy link
Copy Markdown
Member Author

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