public static <T> Observable<T> startFuture(Func0<? extends Future<? extends T>> functionAsync) {
        Future<? extends T> task;
        try {
            task = functionAsync.call();
        } catch (Throwable t) {
            return Observable.error(t);
        }
        return Observable.from(task);
    }
public static < T > Observable < T > startFuture ( Func0 < ? extends Future < ? extends T > > functionAsync ) { Future < ? extends T > task ; try { task = functionAsync . call ( ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } return Observable . from ( task ) ; }
Invokes the asynchronous function, surfacing the result through an observable sequence.
<p>
<em>Important note</em> subscribing to the resulting observable blocks until
the future completes.
@param <T> the result type
@param functionAsync the asynchronous function to run
@return the observable