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 observeOn docs with links and +backpressure explanation #6750

Merged
merged 1 commit into from
Dec 7, 2019
Merged
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
36 changes: 30 additions & 6 deletions src/main/java/io/reactivex/rxjava3/core/Flowable.java
Original file line number Diff line number Diff line change
Expand Up @@ -11419,8 +11419,16 @@ public final Flowable<T> mergeWith(@NonNull CompletableSource other) {
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
* expectation will lead to {@code MissingBackpressureException}. This is the most common operator where the exception
* pops up; look for sources up the chain that don't support backpressure,
* such as {@code interval}, {@code timer}, {code PublishSubject} or {@code BehaviorSubject} and apply any
* of the {@code onBackpressureXXX} operators <strong>before</strong> applying {@code observeOn} itself.</dd>
* such as {@link #interval(long, TimeUnit)}, {@link #timer(long, TimeUnit)},
* {@link io.reactivex.rxjava3.processors.PublishProcessor PublishProcessor} or
* {@link io.reactivex.rxjava3.processors.BehaviorProcessor BehaviorProcessor} and apply any
* of the {@code onBackpressureXXX} operators <strong>before</strong> applying {@code observeOn} itself.
* Note also that request amounts are not preserved between the immediate downstream and the
* immediate upstream. The operator always requests the default {@link #bufferSize()} amount first, then after
* every 75% of that amount delivered, another 75% of this default value. If preserving the request amounts
* is to be preferred over potential excess scheduler infrastructure use, consider applying
* {@link #delay(long, TimeUnit, Scheduler)} with zero time instead.
* </dd>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
* </dl>
Expand Down Expand Up @@ -11458,8 +11466,16 @@ public final Flowable<T> observeOn(Scheduler scheduler) {
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
* expectation will lead to {@code MissingBackpressureException}. This is the most common operator where the exception
* pops up; look for sources up the chain that don't support backpressure,
* such as {@code interval}, {@code timer}, {code PublishSubject} or {@code BehaviorSubject} and apply any
* of the {@code onBackpressureXXX} operators <strong>before</strong> applying {@code observeOn} itself.</dd>
* such as {@link #interval(long, TimeUnit)}, {@link #timer(long, TimeUnit)},
* {@link io.reactivex.rxjava3.processors.PublishProcessor PublishProcessor} or
* {@link io.reactivex.rxjava3.processors.BehaviorProcessor BehaviorProcessor} and apply any
* of the {@code onBackpressureXXX} operators <strong>before</strong> applying {@code observeOn} itself.
* Note also that request amounts are not preserved between the immediate downstream and the
* immediate upstream. The operator always requests the default {@link #bufferSize()} amount first, then after
* every 75% of that amount delivered, another 75% of this default value. If preserving the request amounts
* is to be preferred over potential excess scheduler infrastructure use, consider applying
* {@link #delay(long, TimeUnit, Scheduler, boolean)} with zero time instead.
* </dd>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
* </dl>
Expand Down Expand Up @@ -11501,8 +11517,16 @@ public final Flowable<T> observeOn(Scheduler scheduler, boolean delayError) {
* <dd>This operator honors backpressure from downstream and expects it from the source {@code Publisher}. Violating this
* expectation will lead to {@code MissingBackpressureException}. This is the most common operator where the exception
* pops up; look for sources up the chain that don't support backpressure,
* such as {@code interval}, {@code timer}, {code PublishSubject} or {@code BehaviorSubject} and apply any
* of the {@code onBackpressureXXX} operators <strong>before</strong> applying {@code observeOn} itself.</dd>
* such as {@link #interval(long, TimeUnit)}, {@link #timer(long, TimeUnit)},
* {@link io.reactivex.rxjava3.processors.PublishProcessor PublishProcessor} or
* {@link io.reactivex.rxjava3.processors.BehaviorProcessor BehaviorProcessor} and apply any
* of the {@code onBackpressureXXX} operators <strong>before</strong> applying {@code observeOn} itself.
* Note also that request amounts are not preserved between the immediate downstream and the
* immediate upstream. The operator always requests the specified {@code bufferSize} amount first, then after
* every 75% of that amount delivered, another 75% of this specified value. If preserving the request amounts
* is to be preferred over potential excess scheduler infrastructure use, consider applying
* {@link #delay(long, TimeUnit, Scheduler, boolean)} with zero time instead.
* </dd>
* <dt><b>Scheduler:</b></dt>
* <dd>You specify which {@link Scheduler} this operator will use.</dd>
* </dl>
Expand Down