Skip to content

Conversation

@aka-nse
Copy link

@aka-nse aka-nse commented Nov 21, 2025

This PR fixes #361.

modifications

  • The return object from ObservableExtensions.ToAsyncEnumerable<T> is wrapped, and its iterator calles Dispose of subscription from its DisposeAsync.
  • A new test for ToAsyncEnumerable<T> is added.

breaking change

  • No API signature breaking change is introduced.
  • Now the subscription is reliably unsubscribed when escaping the await-foreach.
    This is likely to be preferable to the previous behavior, but may change side effects in end-user code.

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.

Sequence from ToAsyncEnumerable is not unsubscribed when break or throw

1 participant