Skip to content

Conversation

@akarnokd
Copy link
Collaborator

In the original code, calling base.Dispose disposed the _upstream as well so when the _source is subscribed to, it is immediately disposed and may never run or items may never appear downstream due to a detached observer.

The PR removes this call and is safe because:

  • if _continue is a ForwardOnCompleted, that calls base.Dispose() anyway
  • if _continue is a SubscribeSafe, that is okay as _scheduledDisposable is just a BooleanDisposable and no other resources have to be disposed.

The AppendPrepend_SchedulerLongRunning verifies this scenario.

@danielcweber danielcweber merged commit f5e6346 into dotnet:master Jun 29, 2018
@akarnokd akarnokd deleted the AppendPrependFix branch June 29, 2018 17:28
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.

2 participants