public final Flux<T> filterWhen(Function<? super T, ? extends Publisher<Boolean>> asyncPredicate) {
    """
	Test each value emitted by this {@link Flux} asynchronously using a generated
	{@code Publisher<Boolean>} test. A value is replayed if the first item emitted
	by its corresponding test is {@literal true}. It is dropped if its test is either
	empty or its first emitted value is {@literal false}.
	<p>
	Note that only the first value of the test publisher is considered, and unless it
	is a {@link Mono}, test will be cancelled after receiving that first value. Test
	publishers are generated and subscribed to in sequence.
	
	<p>
	<img class="marble" src="doc-files/marbles/filterWhenForFlux.svg" alt="">
	
	@reactor.discard This operator discards elements that do not match the filter. It
	also discards elements internally queued for backpressure upon cancellation or error triggered by a data signal.
	
	@param asyncPredicate the function generating a {@link Publisher} of {@link Boolean}
	for each value, to filter the Flux with
	@return a filtered {@link Flux}
    """
		return filterWhen(asyncPredicate, Queues.SMALL_BUFFER_SIZE);
	}
public final Flux<T> filterWhen(Function<? super T, ? extends Publisher<Boolean>> asyncPredicate) {
		return filterWhen(asyncPredicate, Queues.SMALL_BUFFER_SIZE);
	}
public final Flux < T > filterWhen ( Function < ? super T , ? extends Publisher < Boolean > > asyncPredicate ) { return filterWhen ( asyncPredicate , Queues . SMALL_BUFFER_SIZE ) ; }
Test each value emitted by this {@link Flux} asynchronously using a generated
{@code Publisher<Boolean>} test. A value is replayed if the first item emitted
by its corresponding test is {@literal true}. It is dropped if its test is either
empty or its first emitted value is {@literal false}.
<p>
Note that only the first value of the test publisher is considered, and unless it
is a {@link Mono}, test will be cancelled after receiving that first value. Test
publishers are generated and subscribed to in sequence.

<p>
<img class="marble" src="doc-files/marbles/filterWhenForFlux.svg" alt="">

@reactor.discard This operator discards elements that do not match the filter. It
also discards elements internally queued for backpressure upon cancellation or error triggered by a data signal.

@param asyncPredicate the function generating a {@link Publisher} of {@link Boolean}
for each value, to filter the Flux with
@return a filtered {@link Flux}
Test each value emitted by this { @link Flux } asynchronously using a generated { @code Publisher<Boolean > } test . A value is replayed if the first item emitted by its corresponding test is { @literal true } . It is dropped if its test is either empty or its first emitted value is { @literal false } . <p > Note that only the first value of the test publisher is considered and unless it is a { @link Mono } test will be cancelled after receiving that first value . Test publishers are generated and subscribed to in sequence .