mirror of
https://github.com/tommyskeff/futur4j.git
synced 2026-01-18 07:16:45 +00:00
@@ -194,13 +194,18 @@ public class Promise<T> {
|
|||||||
}, Schedulers.getTrace(task));
|
}, Schedulers.getTrace(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull Promise<Void> thenConsumerDelayedAsync(@NotNull ExceptionalConsumer<T> task, long delay, @NotNull TimeUnit unit) {
|
public @NotNull Promise<Void> thenConsumeDelayedAsync(@NotNull ExceptionalConsumer<T> task, long delay, @NotNull TimeUnit unit) {
|
||||||
return thenApplyDelayedAsync(result -> {
|
return thenApplyDelayedAsync(result -> {
|
||||||
task.accept(result);
|
task.accept(result);
|
||||||
return null;
|
return null;
|
||||||
}, delay, unit, Schedulers.getTrace(task));
|
}, delay, unit, Schedulers.getTrace(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated(forRemoval = true)
|
||||||
|
public @NotNull Promise<Void> thenConsumerDelayedAsync(@NotNull ExceptionalConsumer<T> task, long delay, @NotNull TimeUnit unit) {
|
||||||
|
return thenConsumeDelayedAsync(task, delay, unit);
|
||||||
|
}
|
||||||
|
|
||||||
public <V> @NotNull Promise<V> thenSupplyAsync(@NotNull ExceptionalSupplier<V> task) {
|
public <V> @NotNull Promise<V> thenSupplyAsync(@NotNull ExceptionalSupplier<V> task) {
|
||||||
return thenApplyAsync(result -> task.get(), Schedulers.getTrace(task));
|
return thenApplyAsync(result -> task.get(), Schedulers.getTrace(task));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user