src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T, D> Observable<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends ObservableSource<? extends T>> sourceSupplier, Consumer<? super D> disposer, boolean eager) {
        ObjectHelper.requireNonNull(resourceSupplier, "resourceSupplier is null");
        ObjectHelper.requireNonNull(sourceSupplier, "sourceSupplier is null");
        ObjectHelper.requireNonNull(disposer, "disposer is null");
        return RxJavaPlugins.onAssembly(new ObservableUsing<T, D>(resourceSupplier, sourceSupplier, disposer, eager));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public static <T, D> Observable<T> using(Callable<? extends D> resourceSupplier, Function<? super D, ? extends ObservableSource<? extends T>> sourceSupplier, Consumer<? super D> disposer, boolean eager) {
        ObjectHelper.requireNonNull(resourceSupplier, "resourceSupplier is null");
        ObjectHelper.requireNonNull(sourceSupplier, "sourceSupplier is null");
        ObjectHelper.requireNonNull(disposer, "disposer is null");
        return RxJavaPlugins.onAssembly(new ObservableUsing<T, D>(resourceSupplier, sourceSupplier, disposer, eager));
    }
Constructs an ObservableSource that creates a dependent resource object which is disposed of just before
termination if you have set {@code disposeEagerly} to {@code true} and a dispose() call does not occur
before termination. Otherwise resource disposal will occur on a dispose() call.  Eager disposal is
particularly appropriate for a synchronous ObservableSource that reuses resources. {@code disposeAction} will
only be called once per subscription.
<p>
<img width="640" height="400" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/using.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code using} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@param <T> the element type of the generated ObservableSource
@param <D> the type of the resource associated with the output sequence
@param resourceSupplier
the factory function to create a resource object that depends on the ObservableSource
@param sourceSupplier
the factory function to create an ObservableSource
@param disposer
the function that will dispose of the resource
@param eager
if {@code true} then disposal will happen either on a dispose() call or just before emission of
a terminal event ({@code onComplete} or {@code onError}).
@return the ObservableSource whose lifetime controls the lifetime of the dependent resource object
@see <a href="http://reactivex.io/documentation/operators/using.html">ReactiveX operators documentation: Using</a>
@since 2.0