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

3.x: Update javadoc for observeOn to mention its eagerness #6700

Merged
merged 2 commits into from
Nov 4, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions src/main/java/io/reactivex/rxjava3/core/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -11418,6 +11418,11 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
* Modifies a Publisher to perform its emissions and notifications on a specified {@link Scheduler},
* asynchronously with a bounded buffer and optionally delays onError notifications.
* <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.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
Expand All @@ -11441,6 +11446,7 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
* @see <a href="http://reactivex.io/documentation/operators/observeon.html">ReactiveX operators documentation: ObserveOn</a>
* @see <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a>
* @see #subscribeOn
* @see #delay(long, TimeUnit, Scheduler)
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean, int)
*/
Expand All @@ -11455,6 +11461,11 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
* Modifies a Publisher to perform its emissions and notifications on a specified {@link Scheduler},
* asynchronously with a bounded buffer of configurable size and optionally delays onError notifications.
* <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.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <dl>
* <dt><b>Backpressure:</b></dt>
Expand All @@ -11479,6 +11490,7 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
* @see <a href="http://reactivex.io/documentation/operators/observeon.html">ReactiveX operators documentation: ObserveOn</a>
* @see <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a>
* @see #subscribeOn
* @see #delay(long, TimeUnit, Scheduler)
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean)
*/
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/io/reactivex/rxjava3/core/Observable.java
Original file line number Diff line number Diff line change
Expand Up @@ -9820,6 +9820,11 @@ public final Observable<T> observeOn(Scheduler scheduler) {
* Modifies an ObservableSource to perform its emissions and notifications on a specified {@link Scheduler},
* asynchronously with an unbounded buffer with {@link Flowable#bufferSize()} "island size" and optionally delays onError notifications.
* <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.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
Expand All @@ -9839,6 +9844,7 @@ public final Observable<T> observeOn(Scheduler scheduler) {
* @see <a href="http://reactivex.io/documentation/operators/observeon.html">ReactiveX operators documentation: ObserveOn</a>
* @see <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a>
* @see #subscribeOn
* @see #delay(long, TimeUnit, Scheduler)
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean, int)
*/
Expand All @@ -9852,6 +9858,11 @@ public final Observable<T> observeOn(Scheduler scheduler, boolean delayError) {
* Modifies an ObservableSource to perform its emissions and notifications on a specified {@link Scheduler},
* asynchronously with an unbounded buffer of configurable "island size" and optionally delays onError notifications.
* <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.
* <p>
* <img width="640" height="308" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/observeOn.png" alt="">
* <dl>
* <dt><b>Scheduler:</b></dt>
Expand All @@ -9872,6 +9883,7 @@ public final Observable<T> observeOn(Scheduler scheduler, boolean delayError) {
* @see <a href="http://reactivex.io/documentation/operators/observeon.html">ReactiveX operators documentation: ObserveOn</a>
* @see <a href="http://www.grahamlea.com/2014/07/rxjava-threading-examples/">RxJava Threading Examples</a>
* @see #subscribeOn
* @see #delay(long, TimeUnit, Scheduler)
* @see #observeOn(Scheduler)
* @see #observeOn(Scheduler, boolean)
*/
Expand Down