reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final <U, V> Flux<List<T>> bufferWhen(Publisher<U> bucketOpening,
			Function<? super U, ? extends Publisher<V>> closeSelector) {
		return bufferWhen(bucketOpening, closeSelector, listSupplier());
	}
public final <U, V> Flux<List<T>> bufferWhen(Publisher<U> bucketOpening,
			Function<? super U, ? extends Publisher<V>> closeSelector) {
		return bufferWhen(bucketOpening, closeSelector, listSupplier());
	}
public final < U , V > Flux < List < T > > bufferWhen ( Publisher < U > bucketOpening , Function < ? super U , ? extends Publisher < V > > closeSelector ) { return bufferWhen ( bucketOpening , closeSelector , listSupplier ( ) ) ; }
Collect incoming values into multiple {@link List} buffers started each time an opening
companion {@link Publisher} emits. Each buffer will last until the corresponding
closing companion {@link Publisher} emits, thus releasing the buffer to the resulting {@link Flux}.
<p>
When Open signal is strictly not overlapping Close signal : dropping buffers (see green marbles in diagram below).
<p>
When Open signal is strictly more frequent than Close signal : overlapping buffers (see second and third buffers in diagram below).
<p>
When Open signal is exactly coordinated with Close signal : exact buffers
<p>
<img class="marble" src="doc-files/marbles/bufferWhen.svg" alt="">

@reactor.discard This operator discards the currently open buffer upon cancellation or error triggered by a data signal.
It DOES NOT provide strong guarantees in the case of overlapping buffers, as elements
might get discarded too early (from the first of two overlapping buffers for instance).

@param bucketOpening a companion {@link Publisher} to subscribe for buffer creation signals.
@param closeSelector a factory that, given a buffer opening signal, returns a companion
{@link Publisher} to subscribe to for buffer closure and emission signals.
@param <U> the element type of the buffer-opening sequence
@param <V> the element type of the buffer-closing sequence

@return a microbatched {@link Flux} of {@link List} delimited by an opening {@link Publisher} and a relative
closing {@link Publisher}
Collect incoming values into multiple { @link List } buffers started each time an opening companion { @link Publisher } emits . Each buffer will last until the corresponding closing companion { @link Publisher } emits thus releasing the buffer to the resulting { @link Flux } . <p > When Open signal is strictly not overlapping Close signal : dropping buffers ( see green marbles in diagram below ) . <p > When Open signal is strictly more frequent than Close signal : overlapping buffers ( see second and third buffers in diagram below ) . <p > When Open signal is exactly coordinated with Close signal : exact buffers <p > <img class = marble src = doc - files / marbles / bufferWhen . svg alt = >