@@ -1992,6 +1992,11 @@ public static <T> Observable<T> fromPublisher(Publisher<? extends T> publisher)
1992
1992
* Returns a cold, synchronous and stateless generator of values.
1993
1993
* <p>
1994
1994
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/generate.2.png" alt="">
1995
+ * <p>
1996
+ * Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
1997
+ * {@link Emitter#onComplete} methods provided to the function via the {@link Emitter} instance should be called synchronously,
1998
+ * never concurrently and only while the function body is executing. Calling them from multiple threads
1999
+ * or outside the function call is not supported and leads to an undefined behavior.
1995
2000
* <dl>
1996
2001
* <dt><b>Scheduler:</b></dt>
1997
2002
* <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2016,6 +2021,11 @@ public static <T> Observable<T> generate(final Consumer<Emitter<T>> generator) {
2016
2021
* Returns a cold, synchronous and stateful generator of values.
2017
2022
* <p>
2018
2023
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/generate.2.png" alt="">
2024
+ * <p>
2025
+ * Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
2026
+ * {@link Emitter#onComplete} methods provided to the function via the {@link Emitter} instance should be called synchronously,
2027
+ * never concurrently and only while the function body is executing. Calling them from multiple threads
2028
+ * or outside the function call is not supported and leads to an undefined behavior.
2019
2029
* <dl>
2020
2030
* <dt><b>Scheduler:</b></dt>
2021
2031
* <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2041,6 +2051,11 @@ public static <T, S> Observable<T> generate(Callable<S> initialState, final BiCo
2041
2051
* Returns a cold, synchronous and stateful generator of values.
2042
2052
* <p>
2043
2053
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/generate.2.png" alt="">
2054
+ * <p>
2055
+ * Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
2056
+ * {@link Emitter#onComplete} methods provided to the function via the {@link Emitter} instance should be called synchronously,
2057
+ * never concurrently and only while the function body is executing. Calling them from multiple threads
2058
+ * or outside the function call is not supported and leads to an undefined behavior.
2044
2059
* <dl>
2045
2060
* <dt><b>Scheduler:</b></dt>
2046
2061
* <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2071,6 +2086,11 @@ public static <T, S> Observable<T> generate(
2071
2086
* Returns a cold, synchronous and stateful generator of values.
2072
2087
* <p>
2073
2088
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/generate.2.png" alt="">
2089
+ * <p>
2090
+ * Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
2091
+ * {@link Emitter#onComplete} methods provided to the function via the {@link Emitter} instance should be called synchronously,
2092
+ * never concurrently and only while the function body is executing. Calling them from multiple threads
2093
+ * or outside the function call is not supported and leads to an undefined behavior.
2074
2094
* <dl>
2075
2095
* <dt><b>Scheduler:</b></dt>
2076
2096
* <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -2096,6 +2116,11 @@ public static <T, S> Observable<T> generate(Callable<S> initialState, BiFunction
2096
2116
* Returns a cold, synchronous and stateful generator of values.
2097
2117
* <p>
2098
2118
* <img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/generate.2.png" alt="">
2119
+ * <p>
2120
+ * Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
2121
+ * {@link Emitter#onComplete} methods provided to the function via the {@link Emitter} instance should be called synchronously,
2122
+ * never concurrently and only while the function body is executing. Calling them from multiple threads
2123
+ * or outside the function call is not supported and leads to an undefined behavior.
2099
2124
* <dl>
2100
2125
* <dt><b>Scheduler:</b></dt>
2101
2126
* <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
0 commit comments