Skip to content

Commit 4749ab3

Browse files
authored
3.x: Update withLatestFrom doc about upstream early complete (#7289)
* 3.x: Update withLatestFrom doc about upstream early complete * Fix singular wording
1 parent 91a10d4 commit 4749ab3

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

src/main/java/io/reactivex/rxjava3/core/Flowable.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19233,6 +19233,13 @@ public final <U, V> Flowable<Flowable<T>> window(
1923319233
/**
1923419234
* Merges the specified {@link Publisher} into the current {@code Flowable} sequence by using the {@code resultSelector}
1923519235
* function only when the current {@code Flowable} (this instance) emits an item.
19236+
*
19237+
* <p>Note that this operator doesn't emit anything until the other source has produced at
19238+
* least one value. The resulting emission only happens when the current {@code Flowable} emits (and
19239+
* not when the other source emits, unlike combineLatest).
19240+
* If the other source doesn't produce any value and just completes, the sequence is completed immediately.
19241+
* If the upstream completes before the other source has produced at least one value, the sequence completes
19242+
* without emission.
1923619243
* <p>
1923719244
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1923819245
*
@@ -19277,6 +19284,8 @@ public final <U, V> Flowable<Flowable<T>> window(
1927719284
* least one value. The resulting emission only happens when the current {@code Flowable} emits (and
1927819285
* not when any of the other sources emit, unlike combineLatest).
1927919286
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
19287+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
19288+
* without emission.
1928019289
*
1928119290
* <dl>
1928219291
* <dt><b>Backpressure:</b></dt>
@@ -19317,6 +19326,8 @@ public final <U, V> Flowable<Flowable<T>> window(
1931719326
* least one value. The resulting emission only happens when the current {@code Flowable} emits (and
1931819327
* not when any of the other sources emit, unlike combineLatest).
1931919328
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
19329+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
19330+
* without emission.
1932019331
*
1932119332
* <dl>
1932219333
* <dt><b>Backpressure:</b></dt>
@@ -19362,6 +19373,8 @@ public final <U, V> Flowable<Flowable<T>> window(
1936219373
* least one value. The resulting emission only happens when the current {@code Flowable} emits (and
1936319374
* not when any of the other sources emit, unlike combineLatest).
1936419375
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
19376+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
19377+
* without emission.
1936519378
*
1936619379
* <dl>
1936719380
* <dt><b>Backpressure:</b></dt>
@@ -19411,6 +19424,8 @@ public final <U, V> Flowable<Flowable<T>> window(
1941119424
* least one value. The resulting emission only happens when the current {@code Flowable} emits (and
1941219425
* not when any of the other sources emit, unlike combineLatest).
1941319426
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
19427+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
19428+
* without emission.
1941419429
*
1941519430
* <dl>
1941619431
* <dt><b>Backpressure:</b></dt>
@@ -19445,6 +19460,8 @@ public final <U, V> Flowable<Flowable<T>> window(
1944519460
* least one value. The resulting emission only happens when the current {@code Flowable} emits (and
1944619461
* not when any of the other sources emit, unlike combineLatest).
1944719462
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
19463+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
19464+
* without emission.
1944819465
*
1944919466
* <dl>
1945019467
* <dt><b>Backpressure:</b></dt>

src/main/java/io/reactivex/rxjava3/core/Observable.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16074,6 +16074,13 @@ public final <U, V> Observable<Observable<T>> window(
1607416074
/**
1607516075
* Merges the specified {@link ObservableSource} into the current {@code Observable} sequence by using the {@code resultSelector}
1607616076
* function only when the current {@code Observable} emits an item.
16077+
*
16078+
* <p>Note that this operator doesn't emit anything until the other source has produced at
16079+
* least one value. The resulting emission only happens when the current {@code Observable} emits (and
16080+
* not when the other source emits, unlike combineLatest).
16081+
* If the other source doesn't produce any value and just completes, the sequence is completed immediately.
16082+
* If the upstream completes before the other source has produced at least one value, the sequence completes
16083+
* without emission.
1607716084
* <p>
1607816085
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1607916086
*
@@ -16112,6 +16119,8 @@ public final <U, R> Observable<R> withLatestFrom(@NonNull ObservableSource<? ext
1611216119
* least one value. The resulting emission only happens when the current {@code Observable} emits (and
1611316120
* not when any of the other sources emit, unlike {@code combineLatest}).
1611416121
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
16122+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
16123+
* without emission.
1611516124
* <p>
1611616125
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1611716126
* <dl>
@@ -16150,6 +16159,8 @@ public final <T1, T2, R> Observable<R> withLatestFrom(
1615016159
* least one value. The resulting emission only happens when the current {@code Observable} emits (and
1615116160
* not when any of the other sources emit, unlike combineLatest).
1615216161
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
16162+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
16163+
* without emission.
1615316164
* <p>
1615416165
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1615516166
* <dl>
@@ -16192,6 +16203,8 @@ public final <T1, T2, T3, R> Observable<R> withLatestFrom(
1619216203
* least one value. The resulting emission only happens when the current {@code Observable} emits (and
1619316204
* not when any of the other sources emit, unlike combineLatest).
1619416205
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
16206+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
16207+
* without emission.
1619516208
* <p>
1619616209
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1619716210
* <dl>
@@ -16238,6 +16251,8 @@ public final <T1, T2, T3, T4, R> Observable<R> withLatestFrom(
1623816251
* least one value. The resulting emission only happens when the current {@code Observable} emits (and
1623916252
* not when any of the other sources emit, unlike combineLatest).
1624016253
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
16254+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
16255+
* without emission.
1624116256
* <p>
1624216257
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1624316258
* <dl>
@@ -16269,6 +16284,8 @@ public final <R> Observable<R> withLatestFrom(@NonNull ObservableSource<?>[] oth
1626916284
* least one value. The resulting emission only happens when the current {@code Observable} emits (and
1627016285
* not when any of the other sources emit, unlike {@code combineLatest}).
1627116286
* If a source doesn't produce any value and just completes, the sequence is completed immediately.
16287+
* If the upstream completes before all other sources have produced at least one value, the sequence completes
16288+
* without emission.
1627216289
* <p>
1627316290
* <img width="640" height="380" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/withLatestFrom.v3.png" alt="">
1627416291
* <dl>

0 commit comments

Comments
 (0)