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

Converted OperatorSubscribeUntil -> takeUntil #14

Merged
merged 2 commits into from
Aug 10, 2015
Merged

Conversation

dlew
Copy link
Contributor

@dlew dlew commented Aug 10, 2015

There was one key problem with OperatorSubscribeUntil, which is that it had the potential to be incompatible with other Operators. This required you to be careful about when you call it, which isn't great for a library.

Switching to takeUntil means that onCompleted will be called when the sequence completes due to a lifecycle event. But that's alright; in most cases it won't change anything. Also, if someone does need to terminate without onCompleted, they can manually handle the Subscription and unsubscribe themselves.

This makes it easier to test certain Subscription states.
There was one key problem with OperatorSubscribeUntil, which is that
it had the potential to be incompatible with other Operators. This
required you to be careful about when you call it, which isn't great
for a library.

Switching to takeUntil means that onCompleted will be called when
the sequence completes due to a lifecycle event. But that's alright;
in most cases it won't change anything. Also, if someone *does*
need to terminate without onCompleted, they can manually handle
the Subscription and unsubscribe themselves.
dlew added a commit that referenced this pull request Aug 10, 2015
Converted OperatorSubscribeUntil -> takeUntil
@dlew dlew merged commit a1107d9 into master Aug 10, 2015
@dlew dlew deleted the dlew/take-until branch August 10, 2015 18:06
@dlew
Copy link
Contributor Author

dlew commented Jun 30, 2016

For future reference - since I forgot where this change originated from - here's the original issue: ReactiveX/RxAndroid#168

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.

None yet

1 participant