Add completable future return to AsyncUtils

This commit is contained in:
TheMode 2021-04-14 04:06:41 +02:00
parent 7d574317dc
commit c57e35c58a

View File

@ -7,8 +7,8 @@ import java.util.concurrent.CompletableFuture;
public final class AsyncUtils {
public static void runAsync(@NotNull Runnable runnable) {
CompletableFuture.runAsync(() -> {
public static @NotNull CompletableFuture<Void> runAsync(@NotNull Runnable runnable) {
return CompletableFuture.runAsync(() -> {
try {
runnable.run();
} catch (Exception e) {