@@ -5318,24 +5318,36 @@ public final <R> Observable<R> scan(R initialValue, Func2<R, ? super T, R> accum
5318
5318
}
5319
5319
5320
5320
/*
5321
+ * Forces an Observable to make synchronous calls and to be well-behaved.
5322
+ * <p>
5323
+ * It is possible for an Observable to invoke its Subscribers' methods asynchronously, perhaps in different
5324
+ * threads. This could make an Observable poorly-behaved, in that it might invoke {@code onCompleted} or
5325
+ * {@code onError} before one of its {@code onNext} invocations. You can force such an Observable to be
5326
+ * well-behaved and synchronous by applying the {@code serialize()} method to it.
5327
+ * <p>
5328
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/synchronize.png">
5329
+ *
5330
+ * @return a {@link Observable} that is guaranteed to be well-behaved and synchronous
5331
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Observable-Utility-Operators#serialize">RxJava Wiki: serialize()</a>
5321
5332
* @since 0.17
5322
5333
*/
5323
5334
public final Observable <T > serialize () {
5324
5335
return lift (new OperatorSerialize <T >());
5325
5336
}
5326
5337
5327
5338
/**
5328
- * Returns a new {@link Observable} that multicasts (shares) the original {@link Observable}.
5329
- * As long as there is more than 1 {@link Subscriber} this {@link Observable} will be subscribed and emitting data.
5339
+ * Returns a new {@link Observable} that multicasts (shares) the original {@link Observable}. As long as
5340
+ * there is more than 1 {@link Subscriber} this {@link Observable} will be subscribed and emitting data.
5330
5341
* When all subscribers have unsubscribed it will unsubscribe from the source {@link Observable}.
5331
5342
* <p>
5332
5343
* This is an alias for {@link #publish().refCount()}.
5333
5344
* <p>
5334
- * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/publishConnect .png">
5345
+ * <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/publishRefCount .png">
5335
5346
*
5336
5347
* @return a {@link Observable} that upon connection causes the source Observable to emit items
5337
5348
* to its {@link Observer}s
5338
- * @see <a href="https://github.com/Netflix/RxJava/wiki/Connectable-Observable-Operators#wiki-observablepublish-and-observablemulticast">RxJava Wiki: publish()</a>
5349
+ * @see <a href="https://github.com/Netflix/RxJava/wiki/Connectable-Observable-Operators#connectableobservablerefcount">RxJava Wiki: refCount()</a>
5350
+ * @since 0.19
5339
5351
*/
5340
5352
public final Observable <T > share () {
5341
5353
return publish ().refCount ();
0 commit comments