Skip to content

Propagate cancellation token in async Merge - #880

Open
wxxb789 wants to merge 1 commit into
polyadic:mainfrom
wxxb789:async-merge-cancellation
Open

Propagate cancellation token in async Merge#880
wxxb789 wants to merge 1 commit into
polyadic:mainfrom
wxxb789:async-merge-cancellation

Conversation

@wxxb789

@wxxb789 wxxb789 commented Aug 10, 2026

Copy link
Copy Markdown

Merge obtains its enumerators and materializes the initial list without the token coming from await foreach, so a cancellation is never observed by the source sequences.

Interleave had the same problem and was fixed in 8f587ac, this applies the same plumbing to Merge.

The added test fails on main and passes with the fix.

`Merge` created its enumerators and materialized the initial list without
the token from `await foreach`, so cancellation was not observed by the
source sequences. `Interleave` already plumbs the token this way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant