src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, V> Flowable<Flowable<T>> window(
            Publisher<U> openingIndicator,
            Function<? super U, ? extends Publisher<V>> closingIndicator) {
        return window(openingIndicator, closingIndicator, bufferSize());
    }
@CheckReturnValue
    @BackpressureSupport(BackpressureKind.ERROR)
    @SchedulerSupport(SchedulerSupport.NONE)
    public final <U, V> Flowable<Flowable<T>> window(
            Publisher<U> openingIndicator,
            Function<? super U, ? extends Publisher<V>> closingIndicator) {
        return window(openingIndicator, closingIndicator, bufferSize());
    }
Returns a Flowable that emits windows of items it collects from the source Publisher. The resulting
Publisher emits windows that contain those items emitted by the source Publisher between the time when
the {@code windowOpenings} Publisher emits an item and when the Publisher returned by
{@code closingSelector} emits an item.
<p>
<img width="640" height="550" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/window2.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>The outer Publisher of this operator doesn't support backpressure because the emission of new
inner Publishers are controlled by the {@code windowOpenings} Publisher.
The inner Publishers honor backpressure and buffer everything until the associated closing
Publisher signals or completes.</dd>
<dt><b>Scheduler:</b></dt>
<dd>This version of {@code window} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <U> the element type of the window-opening Publisher
@param <V> the element type of the window-closing Publishers
@param openingIndicator
a Publisher that, when it emits an item, causes another window to be created
@param closingIndicator
a {@link Function} that produces a Publisher for every window created. When this Publisher
emits an item, the associated window is closed and emitted
@return a Flowable that emits windows of items emitted by the source Publisher that are governed by
the specified window-governing Publishers
@see <a href="http://reactivex.io/documentation/operators/window.html">ReactiveX operators documentation: Window</a>