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

2.x Single.delay documentation and implementation inconsistent #5382

Closed
mmallozzi opened this issue May 31, 2017 · 3 comments
Closed

2.x Single.delay documentation and implementation inconsistent #5382

mmallozzi opened this issue May 31, 2017 · 3 comments

Comments

@mmallozzi
Copy link

The documentation for Single.delay says that success or error signals will be delayed by the specified amount, but in fact errors are not delayed, only successes. I have no opinion on which one should be correct - I ran into it when mocking out the response for an incomplete backend to test a loading/error UI, e.g. Single.error(...).delay(3, TimeUnit.SECONDS), and found that my errors never had a delay. It seems that Observable has both options, with a version of the method that has a boolean flag delayError.

https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/Single.java#L1636
https://github.com/ReactiveX/RxJava/blob/2.x/src/main/java/io/reactivex/internal/operators/single/SingleDelay.java#L66

@akarnokd
Copy link
Member

Indeed there is no option for that in Single and Maybe. Would you like to submit a PR?

mithunsasidharan added a commit to mithunsasidharan/RxJava that referenced this issue Jun 12, 2017
Corrected Single.delay documentation that says that success or error signals will be delayed by the specified amount, but in fact errors are not delayed, only successes.
@mithunsasidharan
Copy link
Contributor

@akarnokd : I've submitted my first PR fixing this -> #5409 Kindly review and advice. Thanks.

mithunsasidharan added a commit to mithunsasidharan/RxJava that referenced this issue Jun 12, 2017
Corrected Single.delay documentation that says that success or error signals will be delayed by the specified amount, but in fact errors are not delayed, only successes.
akarnokd pushed a commit that referenced this issue Jun 12, 2017
* #5382 Corrected Single.delay documentation 

Corrected Single.delay documentation that says that success or error signals will be delayed by the specified amount, but in fact errors are not delayed, only successes.

* #5382 Corrected Single.delay documentation

Corrected Single.delay documentation that says that success or error signals will be delayed by the specified amount, but in fact errors are not delayed, only successes.
@akarnokd
Copy link
Member

Closing via #5409.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants