presto-cli/src/main/java/io/prestosql/cli/Pager.java/Pager/getFinishFuture
class Pager:    public CompletableFuture<?> getFinishFuture()
    {
        checkState(process != null, "getFinishFuture called on null pager");
        CompletableFuture<?> result = new CompletableFuture<>();
        new Thread(() -> {
            try {
                process.waitFor();
            }
            catch (InterruptedException e) {
                // ignore exception because thread is exiting
            }
            finally {
                result.complete(null);
            }
        }).start();
        return unmodifiableFuture(result);
    }