Conversation
Replace Async.RunSynchronously in IDisposable.Dispose with fire-and-forget to avoid blocking the only available thread on platforms such as Blazor WASM. Closes #152 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Feb 22, 2026
github-actions bot
added a commit
that referenced
this pull request
Feb 22, 2026
- Add mapAsyncUnorderedParallelThrottled (closes #31, PR #225) - Fix ofAsyncEnum deadlock on single-threaded runtimes like Blazor WASM (closes #152, PR #229) - Update PackageLicenseExpression and Microsoft.Bcl.AsyncInterfaces to 10.0.3 (closes #168, PR #228) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
added a commit
that referenced
this pull request
Feb 22, 2026
* Prepare release 3.3.2 - Add mapAsyncUnorderedParallelThrottled (closes #31, PR #225) - Fix ofAsyncEnum deadlock on single-threaded runtimes like Blazor WASM (closes #152, PR #229) - Update PackageLicenseExpression and Microsoft.Bcl.AsyncInterfaces to 10.0.3 (closes #168, PR #228) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Bump version to 4.0.0 (#237) * Initial plan * Update version from 3.3.2 to 4.0.0 in RELEASE_NOTES.md and version.props Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: dsyme <7204669+dsyme@users.noreply.github.com> Co-authored-by: Don Syme <dsyme@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Repo Assist here — I'm an automated AI assistant for this repository.
Closes #152Root Cause
AsyncSeq.ofAsyncEnumregisters anIDisposablecleanup to callDisposeAsync()on the underlyingIAsyncEnumerator. The previous implementation waited for disposal synchronously:On single-threaded runtimes such as Blazor WASM,
Async.RunSynchronouslyblocks the only available thread. TheDisposeAsynctask then needs that same thread to complete — causing a deadlock.Fix
Replace the blocking call with a fire-and-forget:
ValueTaskstarts execution immediately; ignoring the return value simply means we do not wait for it. For synchronous enumerators (the common case) theValueTaskis already complete when returned, so there is no observable difference. For asynchronous enumerators the cleanup still happens — we just do not block waiting for it, which is consistent with howIDisposable.Dispose()behaves throughout the rest of the library.Test Status
dotnet test)