question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

1.x and 2.x Javadoc for Completable's retryWhen differs from Observable, Single and Docs

See original GitHub issue

While trying to use the retryWhen operator of the Completable I had problems understanding the behaviour detailed in it´s javadoc:

Returns a Completable which given a Publisher and when this Completable emits an error, delivers that error through an Observable and the Publisher should return a value indicating a retry in response or a terminal event indicating a termination.

Which highly differs from the documentation of Observable, Single and the docs, where the need of calling the provided observable’s onNext/onError/onCompleted is more detailed:

Returns an Observable that emits the same values as the source observable with the exception of an {@code onError}. An {@code onError} notification from the source will result in the emission of a {@link Throwable} item to the Observable provided as an argument to the {@code notificationHandler} function. If that Observable calls {@code onComplete} or {@code onError} then {@code retry} will call {@code onCompleted} or {@code onError} on the child subscription. Otherwise, this Observable will resubscribe to the source Observable.

I could prepare a PR for both 1.x and 2.x versions if needed.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
akarnokdcommented, Nov 4, 2016

Most people set up a flow inside the retryWhen so nobody calls onNext manually in there. However, the text should use a bit of a cleanup:

Returns a Completable which given a Publisher and when this Completable emits an error, delivers that error through a Flowable and the Publisher should signal a value indicating a retry in response or a terminal event indicating a termination.

0reactions
akarnokdcommented, Nov 4, 2016

Don’t want to mix in 2.x terminology.

Closing via #4810.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Completable (RxJava Javadoc 3.1.5) - ReactiveX
Returns a Completable which terminates as soon as one of the source Completable s in the Iterable sequence terminates (normally or with an...
Read more >
What's different in 2.0 - RxJava Doc
We try to remedy this situation in 2.x by having io.reactivex.Observable non-backpressured and the new io.reactivex.Flowable be the backpressure-enabled base ...
Read more >
What is the difference between Observable, Completable and ...
zero or 1). Single and Completable are new types introduced exclusively at RxJava that represent reduced types of Observable , that have ...
Read more >
Observable (RxJava Javadoc 2.1.3)
Unlike the Observable of version 1.x, subscribe(Observer) does not allow external ... Mirrors the one ObservableSource in an Iterable of several ...
Read more >
Reactor 3 Reference Guide
Reactor 1.x and 2.x Generations ... One major difference is that, while an Iterator is pull-based, reactive streams are push-based.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found