Skip to content

Commit a55f43e

Browse files
authored
3.x: Update marbles of amb(), ambArray() and ambWith() (#7144)
* 3.x: Update marbles of amb(), ambArray() and ambWith() * Fix image size
1 parent b75c185 commit a55f43e

File tree

2 files changed

+56
-6
lines changed

2 files changed

+56
-6
lines changed

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

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,21 @@ public abstract class Flowable<@NonNull T> implements Publisher<T> {
163163
* Mirrors the one {@link Publisher} in an {@link Iterable} of several {@code Publisher}s that first either emits an item or sends
164164
* a termination notification.
165165
* <p>
166-
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/amb.v3.png" alt="">
166+
* <img width="640" height="417" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Flowable.amb.png" alt="">
167+
* <p>
168+
* When one of the {@code Publisher}s signal an item or terminates first, all subscriptions to the other
169+
* {@code Publisher}s are canceled.
167170
* <dl>
168171
* <dt><b>Backpressure:</b></dt>
169172
* <dd>The operator itself doesn't interfere with backpressure which is determined by the winning
170173
* {@code Publisher}'s backpressure behavior.</dd>
171174
* <dt><b>Scheduler:</b></dt>
172175
* <dd>{@code amb} does not operate by default on a particular {@link Scheduler}.</dd>
176+
* <dt><b>Error handling:</b></dt>
177+
* <dd>
178+
* If any of the losing {@code Publisher}s signals an error, the error is routed to the global
179+
* error handler via {@link RxJavaPlugins#onError(Throwable)}.
180+
* </dd>
173181
* </dl>
174182
*
175183
* @param <T> the common element type
@@ -193,13 +201,21 @@ public static <T> Flowable<T> amb(@NonNull Iterable<@NonNull ? extends Publisher
193201
* Mirrors the one {@link Publisher} in an array of several {@code Publisher}s that first either emits an item or sends
194202
* a termination notification.
195203
* <p>
196-
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/amb.v3.png" alt="">
204+
* <img width="640" height="417" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Flowable.ambArray.png" alt="">
205+
* <p>
206+
* When one of the {@code Publisher}s signal an item or terminates first, all subscriptions to the other
207+
* {@code Publisher}s are canceled.
197208
* <dl>
198209
* <dt><b>Backpressure:</b></dt>
199210
* <dd>The operator itself doesn't interfere with backpressure which is determined by the winning
200211
* {@code Publisher}'s backpressure behavior.</dd>
201212
* <dt><b>Scheduler:</b></dt>
202213
* <dd>{@code ambArray} does not operate by default on a particular {@link Scheduler}.</dd>
214+
* <dt><b>Error handling:</b></dt>
215+
* <dd>
216+
* If any of the losing {@code Publisher}s signals an error, the error is routed to the global
217+
* error handler via {@link RxJavaPlugins#onError(Throwable)}.
218+
* </dd>
203219
* </dl>
204220
*
205221
* @param <T> the common element type
@@ -5927,13 +5943,22 @@ public final Single<Boolean> all(@NonNull Predicate<? super T> predicate) {
59275943
* Mirrors the {@link Publisher} (current or provided) that first either emits an item or sends a termination
59285944
* notification.
59295945
* <p>
5930-
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/amb.v3.png" alt="">
5946+
* <img width="640" height="376" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Flowable.ambWith.png" alt="">
5947+
* <p>
5948+
* When the current {@code Flowable} signals an item or terminates first, the subscription to the other
5949+
* {@code Publisher} is canceled. If the other {@code Publisher} signals an item or terminates first,
5950+
* the subscription to the current {@code Flowable} is canceled.
59315951
* <dl>
59325952
* <dt><b>Backpressure:</b></dt>
59335953
* <dd>The operator itself doesn't interfere with backpressure which is determined by the winning
59345954
* {@code Publisher}'s backpressure behavior.</dd>
59355955
* <dt><b>Scheduler:</b></dt>
59365956
* <dd>{@code ambWith} does not operate by default on a particular {@link Scheduler}.</dd>
5957+
* <dt><b>Error handling:</b></dt>
5958+
* <dd>
5959+
* If the losing {@code Publisher} signals an error, the error is routed to the global
5960+
* error handler via {@link RxJavaPlugins#onError(Throwable)}.
5961+
* </dd>
59375962
* </dl>
59385963
*
59395964
* @param other

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

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,18 @@ public abstract class Observable<@NonNull T> implements ObservableSource<T> {
105105
* Mirrors the one {@link ObservableSource} in an {@link Iterable} of several {@code ObservableSource}s that first either emits an item or sends
106106
* a termination notification.
107107
* <p>
108-
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/amb.v3.png" alt="">
108+
* <img width="640" height="505" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Observable.amb.png" alt="">
109+
* <p>
110+
* When one of the {@code ObservableSource}s signal an item or terminates first, all subscriptions to the other
111+
* {@code ObservableSource}s are disposed.
109112
* <dl>
110113
* <dt><b>Scheduler:</b></dt>
111114
* <dd>{@code amb} does not operate by default on a particular {@link Scheduler}.</dd>
115+
* <dt><b>Error handling:</b></dt>
116+
* <dd>
117+
* If any of the losing {@code ObservableSource}s signals an error, the error is routed to the global
118+
* error handler via {@link RxJavaPlugins#onError(Throwable)}.
119+
* </dd>
112120
* </dl>
113121
*
114122
* @param <T> the common element type
@@ -131,10 +139,18 @@ public static <T> Observable<T> amb(@NonNull Iterable<@NonNull ? extends Observa
131139
* Mirrors the one {@link ObservableSource} in an array of several {@code ObservableSource}s that first either emits an item or sends
132140
* a termination notification.
133141
* <p>
134-
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/amb.v3.png" alt="">
142+
* <img width="640" height="505" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Observable.ambArray.png" alt="">
143+
* <p>
144+
* When one of the {@code ObservableSource}s signal an item or terminates first, all subscriptions to the other
145+
* {@code ObservableSource}s are disposed.
135146
* <dl>
136147
* <dt><b>Scheduler:</b></dt>
137148
* <dd>{@code ambArray} does not operate by default on a particular {@link Scheduler}.</dd>
149+
* <dt><b>Error handling:</b></dt>
150+
* <dd>
151+
* If any of the losing {@code ObservableSource}s signals an error, the error is routed to the global
152+
* error handler via {@link RxJavaPlugins#onError(Throwable)}.
153+
* </dd>
138154
* </dl>
139155
*
140156
* @param <T> the common element type
@@ -5350,10 +5366,19 @@ public final Single<Boolean> all(@NonNull Predicate<? super T> predicate) {
53505366
* Mirrors the current {@code Observable} or the other {@link ObservableSource} provided of which the first either emits an item or sends a termination
53515367
* notification.
53525368
* <p>
5353-
* <img width="640" height="385" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/ambWith.o.v3.png" alt="">
5369+
* <img width="640" height="448" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Observable.ambWith.png" alt="">
5370+
* <p>
5371+
* When the current {@code Observable} signals an item or terminates first, the subscription to the other
5372+
* {@code ObservableSource} is disposed. If the other {@code ObservableSource} signals an item or terminates first,
5373+
* the subscription to the current {@code Observable} is disposed.
53545374
* <dl>
53555375
* <dt><b>Scheduler:</b></dt>
53565376
* <dd>{@code ambWith} does not operate by default on a particular {@link Scheduler}.</dd>
5377+
* <dt><b>Error handling:</b></dt>
5378+
* <dd>
5379+
* If the losing {@code ObservableSource} signals an error, the error is routed to the global
5380+
* error handler via {@link RxJavaPlugins#onError(Throwable)}.
5381+
* </dd>
53575382
* </dl>
53585383
*
53595384
* @param other

0 commit comments

Comments
 (0)