@Override
    protected <T> CompletionStage<T> withExecute(final CheckedFunction<Jdbi, T> callback) {
        return CompletableFuture.supplyAsync(() -> {
            try {
                return callback.apply(jdbi);
            } catch (Throwable t) {
                throw new CompletionException(t);
            }
        }, executor);
    }
Make sure to run the callback in a thread supplied by the executor

@param callback the callback that takes a Jdbi instance and returns a value
@param <T>      type returned by the callback
@return a completion stage that will complete when the callback returns a value or throws an exception
core/src/main/java/org/jdbi/v3/core/async/JdbiExecutorImpl.java