-
Couldn't load subscription status.
- Fork 833
Fix AsyncLazy cancellation #18211
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 AsyncLazy cancellation #18211
Conversation
|
|
I was hoping to make this code as clear and straightforward as possible, but I see now there is endless potential for bugs. On the brighter note, we already have another implementation with very similar functionality. If need arises, |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
Files not reviewed (6)
- src/Compiler/Facilities/AsyncMemoize.fs: Language not supported
- src/Compiler/Facilities/AsyncMemoize.fsi: Language not supported
- tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_net9.0.bsl: Language not supported
- tests/ILVerify/ilverify_FSharp.Compiler.Service_Debug_netstandard2.0.bsl: Language not supported
- tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_net9.0.bsl: Language not supported
- tests/ILVerify/ilverify_FSharp.Compiler.Service_Release_netstandard2.0.bsl: Language not supported
|
Thanks @majocha. Yeah it's about progress, not perfection here with async states. As long as a change somewhat improves the situation, it's all good. |
Description
Make the logic around cancelling requests more straightforward.
Explicitly handle
TaskCanceledExceptionto preventAsyncLazyfrom caching it.Fixes #18209
Checklist
AsyncMemoizestress testto fail sometimes. Tested by running 1000 iterations and making sure it no longer reproduce locally.