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 hang in AsyncLazy<T>.DisposeValue() when T : IAsyncDisposable #1271

Merged
merged 2 commits into from
Jan 6, 2024

Conversation

AArnott
Copy link
Member

@AArnott AArnott commented Jan 5, 2024

AsyncLazy<T> had been clearing the JoinableTaskFactory field as soon as the value factory had completed. But with the introduction of DisposeValue(), we have a subsequent need of the JTF object to avoid deadlocks.

@AArnott AArnott added the bug label Jan 5, 2024
@AArnott AArnott added this to the v17.10 milestone Jan 5, 2024
`AsyncLazy<T>` had been clearing the `JoinableTaskFactory` field as soon as the value factory had completed. But with the introduction of `DisposeValue()`, we have a subsequent need of the JTF object to avoid deadlocks.
@AArnott AArnott merged commit c51f4d2 into microsoft:main Jan 6, 2024
1 of 5 checks passed
@AArnott AArnott deleted the fixAsyncLazyDispose branch January 6, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants