reactor-core/src/main/java/reactor/core/publisher/Flux.java
public static <T, D> Flux<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends
			Publisher<? extends T>> sourceSupplier, Consumer<? super D> resourceCleanup) {
		return using(resourceSupplier, sourceSupplier, resourceCleanup, true);
	}
public static <T, D> Flux<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends
			Publisher<? extends T>> sourceSupplier, Consumer<? super D> resourceCleanup) {
		return using(resourceSupplier, sourceSupplier, resourceCleanup, true);
	}
public static < T , D > Flux < T > using ( Callable < ? extends D > resourceSupplier , Function < ? super D , ? extends Publisher < ? extends T > > sourceSupplier , Consumer < ? super D > resourceCleanup ) { return using ( resourceSupplier , sourceSupplier , resourceCleanup , true ) ; }
Uses a resource, generated by a supplier for each individual Subscriber, while streaming the values from a
Publisher derived from the same resource and makes sure the resource is released if the sequence terminates or
the Subscriber cancels.
<p>
Eager resource cleanup happens just before the source termination and exceptions raised by the cleanup Consumer
may override the terminal even.
<p>
<img class="marble" src="doc-files/marbles/usingForFlux.svg" alt="">
<p>
For an asynchronous version of the cleanup, with distinct path for onComplete, onError
and cancel terminations, see {@link #usingWhen(Publisher, Function, Function, Function, Function)}.

@param resourceSupplier a {@link Callable} that is called on subscribe to generate the resource
@param sourceSupplier a factory to derive a {@link Publisher} from the supplied resource
@param resourceCleanup a resource cleanup callback invoked on completion
@param <T> emitted type
@param <D> resource type

@return a new {@link Flux} built around a disposable resource
@see #usingWhen(Publisher, Function, Function, Function, Function)
@see #usingWhen(Publisher, Function, Function)
Uses a resource generated by a supplier for each individual Subscriber while streaming the values from a Publisher derived from the same resource and makes sure the resource is released if the sequence terminates or the Subscriber cancels . <p > Eager resource cleanup happens just before the source termination and exceptions raised by the cleanup Consumer may override the terminal even . <p > <img class = marble src = doc - files / marbles / usingForFlux . svg alt = > <p > For an asynchronous version of the cleanup with distinct path for onComplete onError and cancel terminations see { @link #usingWhen ( Publisher Function Function Function Function ) } .