@@ -1992,6 +1992,11 @@ public static <T> Observable<T> fromPublisher(Publisher<? extends T> publisher)
19921992 * Returns a cold, synchronous and stateless generator of values.
19931993 * <p>
19941994 * <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.
19952000 * <dl>
19962001 * <dt><b>Scheduler:</b></dt>
19972002 * <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) {
20162021 * Returns a cold, synchronous and stateful generator of values.
20172022 * <p>
20182023 * <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.
20192029 * <dl>
20202030 * <dt><b>Scheduler:</b></dt>
20212031 * <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
20412051 * Returns a cold, synchronous and stateful generator of values.
20422052 * <p>
20432053 * <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.
20442059 * <dl>
20452060 * <dt><b>Scheduler:</b></dt>
20462061 * <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(
20712086 * Returns a cold, synchronous and stateful generator of values.
20722087 * <p>
20732088 * <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.
20742094 * <dl>
20752095 * <dt><b>Scheduler:</b></dt>
20762096 * <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
20962116 * Returns a cold, synchronous and stateful generator of values.
20972117 * <p>
20982118 * <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.
20992124 * <dl>
21002125 * <dt><b>Scheduler:</b></dt>
21012126 * <dd>{@code generate} does not operate by default on a particular {@link Scheduler}.</dd>
0 commit comments