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: Update javadoc for observeOn to mention its eagerness #6722

Merged
merged 1 commit into from
Nov 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/main/java/io/reactivex/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -11590,6 +11590,11 @@ public final Flowable<T> mergeWith(@NonNull CompletableSource other) {
* asynchronous. If strict event ordering is required, consider using the {@link #observeOn(Scheduler, boolean)} overload.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <p>
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
* which may result in a longer than expected occupation of this thread. In other terms,
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
Expand All @@ -11610,6 +11615,7 @@ public final Flowable<T> mergeWith(@NonNull CompletableSource other) {
* @see #subscribeOn
* @see #observeOn(Scheduler, boolean)
* @see #observeOn(Scheduler, boolean, int)
* @see #delay(long, TimeUnit, Scheduler)
*/
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
Expand All @@ -11623,6 +11629,11 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
* asynchronously with a bounded buffer and optionally delays onError notifications.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <p>
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
* which may result in a longer than expected occupation of this thread. In other terms,
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
Expand All @@ -11647,6 +11658,7 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
* @see #subscribeOn
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean, int)
* @see #delay(long, TimeUnit, Scheduler, boolean)
*/
@CheckReturnValue
@BackpressureSupport(BackpressureKind.FULL)
Expand All @@ -11660,6 +11672,11 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
* asynchronously with a bounded buffer of configurable size and optionally delays onError notifications.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <p>
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
* which may result in a longer than expected occupation of this thread. In other terms,
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
* <dl>
* <dt><b>Backpressure:</b></dt>
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
Expand All @@ -11685,6 +11702,7 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
* @see #subscribeOn
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean)
* @see #delay(long, TimeUnit, Scheduler, boolean)
*/
@CheckReturnValue
@NonNull
Expand Down
18 changes: 18 additions & 0 deletions src/main/java/io/reactivex/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9902,6 +9902,11 @@ public final Observable<T> mergeWith(@NonNull CompletableSource other) {
* asynchronous. If strict event ordering is required, consider using the {@link #observeOn(Scheduler, boolean)} overload.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <p>
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
* which may result in a longer than expected occupation of this thread. In other terms,
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
Expand All @@ -9918,6 +9923,7 @@ public final Observable<T> mergeWith(@NonNull CompletableSource other) {
* @see #subscribeOn
* @see #observeOn(Scheduler, boolean)
* @see #observeOn(Scheduler, boolean, int)
* @see #delay(long, TimeUnit, Scheduler)
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
Expand All @@ -9930,6 +9936,11 @@ public final Observable<T> observeOn(Scheduler scheduler) {
* asynchronously with an unbounded buffer with {@link Flowable#bufferSize()} "island size" and optionally delays onError notifications.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <p>
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
* which may result in a longer than expected occupation of this thread. In other terms,
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
Expand All @@ -9950,6 +9961,7 @@ public final Observable<T> observeOn(Scheduler scheduler) {
* @see #subscribeOn
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean, int)
* @see #delay(long, TimeUnit, Scheduler, boolean)
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
Expand All @@ -9962,6 +9974,11 @@ public final Observable<T> observeOn(Scheduler scheduler, boolean delayError) {
* asynchronously with an unbounded buffer of configurable "island size" and optionally delays onError notifications.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <p>
* This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread,
* which may result in a longer than expected occupation of this thread. In other terms,
* it does not allow per-signal fairness in case the worker runs on a shared underlying thread.
* If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead.
* <dl>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
Expand All @@ -9983,6 +10000,7 @@ public final Observable<T> observeOn(Scheduler scheduler, boolean delayError) {
* @see #subscribeOn
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean)
* @see #delay(long, TimeUnit, Scheduler, boolean)
*/
@CheckReturnValue
@SchedulerSupport(SchedulerSupport.CUSTOM)
Expand Down