Add tests for EventTask#resumeWhenComplete and clarify Javadoc.

This commit is contained in:
Andrew Steinborn
2021-10-10 16:37:22 -04:00
parent 08f1b87267
commit 1aaecfff08
2 changed files with 122 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ public interface EventTask {
}
/**
* Creates an continuation based {@link EventTask} from the given {@link Consumer}. The task isn't
* Creates a continuation based {@link EventTask} from the given {@link Consumer}. The task isn't
* guaranteed to be executed asynchronously ({@link #requiresAsync()} always returns
* {@code false}).
*
@@ -99,8 +99,9 @@ public interface EventTask {
}
/**
* Creates an continuation based {@link EventTask} for the given {@link CompletableFuture}. The
* continuation will be notified once the given future is completed.
* Creates a continuation based {@link EventTask} for the given {@link CompletableFuture}. The
* continuation is resumed upon completion of the given {@code future}, whether it is completed
* successfully or not.
*
* @param future The task to wait for
* @return The event task