Skip to content

Commit 5747017

Browse files
marwinxxiiakarnokd
authored andcommitted
Add note to SingleSubscriber doc about unsubscribe invocation in onSuccess and onError. (#4769)
1 parent 039a703 commit 5747017

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/rx/SingleSubscriber.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
* {@code Single} calls the SingleSubscriber's {@link #onSuccess} and {@link #onError} methods to provide
2525
* notifications. A well-behaved {@code Single} will call a SingleSubscriber's {@link #onSuccess} method exactly
2626
* once or the SingleSubscriber's {@link #onError} method exactly once.
27+
* <p>
28+
* Note, that if you want {@link #isUnsubscribed} to return {@code true} after {@link #onSuccess} or {@link #onError}
29+
* invocation, you need to invoke {@link #unsubscribe} in these methods.
2730
*
2831
* @see <a href="http://reactivex.io/documentation/observable.html">ReactiveX documentation: Observable</a>
2932
* @param <T>

0 commit comments

Comments
 (0)