subscribe
Subscribes the given observer to receive updates, including an Observer.onComplete notification when the upstream source terminates. The subscription is stored in the given composite
Upon the Observer.onComplete signal, the observer is removed from the given composite
Note. adding to the composite happens on the caller thread, and removals may happen on a different one. As such, users should be certain that either composite is thread-safe, or that the caller and disposal thread are the same.
Return
A Disposable for cancelling the subscription.
Parameters
The observer to receive values and the completion signal.
Subscribes the given onNext to receive updates. The subscription is stored in the given composite
Upon the Observer.onComplete signal, the onNext is removed from the given composite
Note. adding to the composite happens on the caller thread, and removals may happen on a different one. As such, users should be certain that either composite is thread-safe, or that the caller and disposal thread are the same.
Return
A Disposable for cancelling the subscription.
Parameters
The Consumer to receive emitted values.
Subscribes the given onNext to receive updates and the given onComplete to receive the Observer.onComplete signal. The subscription is stored in the given composite
Upon the Observer.onComplete signal, the onNext is removed from the given composite
Note. adding to the composite happens on the caller thread, and removals may happen on a different one. As such, users should be certain that either composite is thread-safe, or that the caller and disposal thread are the same.
Return
A Disposable for cancelling the subscription.
Parameters
The Consumer to receive emitted values.
The block of code to run upon completion