return async("async: " + func.getClass().getName(), func);
}
public static <T> Task<T> blocking(final String name, final Callable<? extends T> callable, final Executor executor) {
ArgumentUtil.requireNotNull(callable, "callable");
ArgumentUtil.requireNotNull(callable, "executor");
<BUG>return async(name, () -> {
final SettablePromise<T> promise = Promises.settable();</BUG>
executor.execute(() -> {
try {
promise.done(callable.call());

return async("async: " + func.getClass().getName(), func);
}
public static <T> Task<T> blocking(final String name, final Callable<? extends T> callable, final Executor executor) {
ArgumentUtil.requireNotNull(callable, "callable");
ArgumentUtil.requireNotNull(callable, "executor");
Task<T> blockingTask = async(name, () -> {
final SettablePromise<T> promise = Promises.settable();
executor.execute(() -> {
try {
promise.done(callable.call());
