Completable missing lambda-subscibe() w/ onSubscribe parameter to provide Disposable
See original GitHub issueCompletable
does not have a lambda subscribe()
method that provides a Disposable
via an onSubscribe
parameter, equivalent to the one implemented in Observable
:
public final Disposable subscribe(
Consumer<? super T> onNext,
Consumer<? super Throwable> onError,
Action onComplete,
Consumer<? super Disposable> onSubscribe)
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
The result of subscribe is not used - Stack Overflow
The IDE does not know what potential effects your subscription can have when it's not disposed, so it treats it as potentially unsafe....
Read more >Completable (RxJava Javadoc 3.1.5) - ReactiveX
Returns a Completable instance that calls the given onSubscribe callback with the disposable that the downstream CompletableObserver s receive upon ...
Read more >RxJava 2: Where's disposable when subscribe observer?
In RxJava subscribe , which the user need to provided individual lambda for each type of return (e.g. onSuccess, onError and onComplete), ...
Read more >Bug Patterns - Error Prone
The called constructor accepts a parameter with the same name and type as one of its caller's ... Duration.get() only works with SECONDS...
Read more >Integromat - Error "Missing value of required parameter 'URL'."
Below is a screenshot of a scenario I have with added Error Handlers for each HTTP Get File module (I'm capturing images to...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I guess we can start creating issues marked with
Design
and3.x
so we don’t forget these.@artem-zinnatullin Whoops, I guess I never hit the “Comment” button on my earlier reply.
Thanks for the suggestions, I can certainly work with them. And it looks like there is a plan to resolve the consistency issue in v3.
This is somewhat of a related tangent, but I wanted to get your thoughts before making a new issue. I think the documentation should make it clear that use of the
.doOnSubscribe()
should be avoided to acquire aDisposable
for purposes of disposing / unsubscribing from the Rx chain. I had been doing this until I ran into an issue withdispose()
not working as expected and after a fair amount of digging I discovered this SO answer by @akarnokd which schooled me in the error of my ways.