reactor-core/src/main/java/reactor/core/publisher/Flux.java
public final Flux<T> doFinally(Consumer<SignalType> onFinally) {
		Objects.requireNonNull(onFinally, "onFinally");
		if (this instanceof Fuseable) {
			return onAssembly(new FluxDoFinallyFuseable<>(this, onFinally));
		}
		return onAssembly(new FluxDoFinally<>(this, onFinally));
	}
public final Flux<T> doFinally(Consumer<SignalType> onFinally) {
		Objects.requireNonNull(onFinally, "onFinally");
		if (this instanceof Fuseable) {
			return onAssembly(new FluxDoFinallyFuseable<>(this, onFinally));
		}
		return onAssembly(new FluxDoFinally<>(this, onFinally));
	}
Add behavior (side-effect) triggered <strong>after</strong> the {@link Flux} terminates for any reason,
including cancellation. The terminating event ({@link SignalType#ON_COMPLETE},
{@link SignalType#ON_ERROR} and {@link SignalType#CANCEL}) is passed to the consumer,
which is executed after the signal has been passed downstream.
<p>
Note that the fact that the signal is propagated downstream before the callback is
executed means that several doFinally in a row will be executed in
<strong>reverse order</strong>. If you want to assert the execution of the callback
please keep in mind that the Flux will complete before it is executed, so its
effect might not be visible immediately after eg. a {@link #blockLast()}.
<p>
<img class="marble" src="doc-files/marbles/doFinallyForFlux.svg" alt="">

@param onFinally the callback to execute after a terminal signal (complete, error
or cancel)
@return an observed {@link Flux}