src/main/java/io/reactivex/disposables/Disposables.java
@NonNull
    public static Disposable fromRunnable(@NonNull Runnable run) {
        ObjectHelper.requireNonNull(run, "run is null");
        return new RunnableDisposable(run);
    }
@NonNull
    public static Disposable fromRunnable(@NonNull Runnable run) {
        ObjectHelper.requireNonNull(run, "run is null");
        return new RunnableDisposable(run);
    }
@ NonNull public static Disposable fromRunnable ( @ NonNull Runnable run ) { ObjectHelper . requireNonNull ( run , "run is null" ) ; return new RunnableDisposable ( run ) ; }
Construct a Disposable by wrapping a Runnable that is
executed exactly once when the Disposable is disposed.
@param run the Runnable to wrap
@return the new Disposable instance
Construct a Disposable by wrapping a Runnable that is executed exactly once when the Disposable is disposed .