The Javadocs of the generate methods as well the Emitter interface should explicitly mention that the methods should be called non-concurrently. Generate can be found in both Flowable and Observable.
generate:
<p>
Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
{@link Emitter#onComplete} methods provided to the function should be called synchronously,
never concurrently and only while the method is executing. Calling them from multiple threads
or outside the function call is not supported and leads to an undefined behavior.
Emitter:
<p>
Note that the {@link Emitter#onNext}, {@link Emitter#onError} and
{@link Emitter#onComplete} methods provided to the function should be called synchronously,
never concurrently. Calling them from multiple threads is not supported and leads to an
undefined behavior.