We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
According to Observable.takeUntil(ObservableSource other)'s documentation
Returns an Observable that emits the items emitted by the current Observable until a second ObservableSource emits an item.
Emphasis is mine
Looking at ObservableTakeUntil, it looks to me that onNext and onComplete are equivalent
onNext
onComplete
I created this test, and the output is exactly the same
class TakeUntilTest { @Test fun `when Observable completes, then takeUntil completes`(){ Observable.just(1, 2, 3) .takeUntil(Observable.empty<Unit>()) .subscribe( { println("Item: $it") }, Timber::e, { println("onComplete") } ) } @Test fun `when Observable emits, then takeUntil completes`(){ Observable.just(1, 2, 3) .takeUntil(Observable.just(Unit)) .subscribe( { println("Item: $it") }, Timber::e, { println("onComplete") } ) } }
According to documentation, the first test should emit 1, 2 and 3 values
Thus, I think the documentation should say something like
Returns an Observable that emits the items emitted by the current Observable until a second ObservableSource emits an item or completes successfully.
Thanks!
The text was updated successfully, but these errors were encountered:
Yes. PR welcome.
Sorry, something went wrong.
What do you use to generate marble diagrams? This https://rx-marbles-online.herokuapp.com/ ?
It'd help to add whichever tool you use to contributing documentation https://github.com/ReactiveX/RxJava/blob/3.x/CONTRIBUTING.md, as well as wording guidelines for documentation
Don't worry about the diagram, I have an Excel spreadsheet for them.
You can use these:
Resize: 640 x 188 URL: https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Flowable.takeUntil.p.png
Resize: 640 x 213 URL: https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Observable.takeUntil.o.png
Successfully merging a pull request may close this issue.
Uh oh!
There was an error while loading. Please reload this page.
According to Observable.takeUntil(ObservableSource other)'s documentation
Emphasis is mine
Looking at ObservableTakeUntil, it looks to me that
onNext
andonComplete
are equivalentI created this test, and the output is exactly the same
According to documentation, the first test should emit 1, 2 and 3 values
Thus, I think the documentation should say something like
Thanks!
The text was updated successfully, but these errors were encountered: