Skip to content

Commit 8ed6cc1

Browse files
JosemyDuarteakarnokd
authored andcommitted
3.x: Update javadoc for observeOn to mention its eagerness (#6700)
* Update javadoc for observeOn to mention its eagerness * Update javadoc order
1 parent b9727da commit 8ed6cc1

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

Diff for: src/main/java/io/reactivex/rxjava3/core/Flowable.java

+14
Original file line numberDiff line numberDiff line change
@@ -11419,6 +11419,12 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
1141911419
* asynchronously with a bounded buffer and optionally delays onError notifications.
1142011420
* <p>
1142111421
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
11422+
* <p>
11423+
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
11424+
* which may result in a longer than expected occupation of this thread. In other terms,
11425+
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
11426+
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
11427+
* <p>
1142211428
* <dl>
1142311429
* <dt><b>Backpressure:</b></dt>
1142411430
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
@@ -11443,6 +11449,7 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
1144311449
* @see #subscribeOn
1144411450
* @see #observeOn(Scheduler)
1144511451
* @see #observeOn(Scheduler, boolean, int)
11452+
* @see #delay(long, TimeUnit, Scheduler)
1144611453
*/
1144711454
@CheckReturnValue
1144811455
@BackpressureSupport(BackpressureKind.FULL)
@@ -11456,6 +11463,12 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
1145611463
* asynchronously with a bounded buffer of configurable size and optionally delays onError notifications.
1145711464
* <p>
1145811465
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
11466+
* <p>
11467+
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
11468+
* which may result in a longer than expected occupation of this thread. In other terms,
11469+
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
11470+
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
11471+
* <p>
1145911472
* <dl>
1146011473
* <dt><b>Backpressure:</b></dt>
1146111474
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
@@ -11481,6 +11494,7 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
1148111494
* @see #subscribeOn
1148211495
* @see #observeOn(Scheduler)
1148311496
* @see #observeOn(Scheduler, boolean)
11497+
* @see #delay(long, TimeUnit, Scheduler)
1148411498
*/
1148511499
@CheckReturnValue
1148611500
@NonNull

Diff for: src/main/java/io/reactivex/rxjava3/core/Observable.java

+14
Original file line numberDiff line numberDiff line change
@@ -9821,6 +9821,12 @@ public final Observable<T> observeOn(Scheduler scheduler) {
98219821
* asynchronously with an unbounded buffer with {@link Flowable#bufferSize()} "island size" and optionally delays onError notifications.
98229822
* <p>
98239823
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
9824+
* <p>
9825+
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
9826+
* which may result in a longer than expected occupation of this thread. In other terms,
9827+
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
9828+
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
9829+
* <p>
98249830
* <dl>
98259831
* <dt><b>Scheduler:</b></dt>
98269832
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
@@ -9841,6 +9847,7 @@ public final Observable<T> observeOn(Scheduler scheduler) {
98419847
* @see #subscribeOn
98429848
* @see #observeOn(Scheduler)
98439849
* @see #observeOn(Scheduler, boolean, int)
9850+
* @see #delay(long, TimeUnit, Scheduler)
98449851
*/
98459852
@CheckReturnValue
98469853
@SchedulerSupport(SchedulerSupport.CUSTOM)
@@ -9853,6 +9860,12 @@ public final Observable<T> observeOn(Scheduler scheduler, boolean delayError) {
98539860
* asynchronously with an unbounded buffer of configurable "island size" and optionally delays onError notifications.
98549861
* <p>
98559862
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
9863+
* <p>
9864+
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
9865+
* which may result in a longer than expected occupation of this thread. In other terms,
9866+
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
9867+
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
9868+
* <p>
98569869
* <dl>
98579870
* <dt><b>Scheduler:</b></dt>
98589871
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
@@ -9874,6 +9887,7 @@ public final Observable<T> observeOn(Scheduler scheduler, boolean delayError) {
98749887
* @see #subscribeOn
98759888
* @see #observeOn(Scheduler)
98769889
* @see #observeOn(Scheduler, boolean)
9890+
* @see #delay(long, TimeUnit, Scheduler)
98779891
*/
98789892
@CheckReturnValue
98799893
@SchedulerSupport(SchedulerSupport.CUSTOM)

0 commit comments

Comments
 (0)