public CompletableFuture < T > completeAsync ( Supplier < ? extends T > supplier , Executor executor ) { if ( supplier == null || executor == null ) throw new NullPointerException ( ) ; executor . execute ( new AsyncSupply < T > ( this , supplier ) ) ; return this ; }
Completes this CompletableFuture with the result of the given Supplier function invoked from an asynchronous task using the given executor .