Skip to content

Commit c012e1b

Browse files
authored
Update README.md
1 parent 1db4177 commit c012e1b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ CompletableTask
5151
5252
Promise<?> p2 = p1.thenRunAsync(myAction);
5353
...
54-
p.cancel();
54+
p1.cancel();
5555
```
5656
In the example above `myConsumer` will be interrupted if already in progress. Both `p1` and `p2` will be resolved faulty with [CancellationException](https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CancellationException.html).
5757

@@ -78,18 +78,18 @@ Returns a promise that is completed normally when all `CompletionStage`-s passed
7878

7979
`public static <T> Promise<T> any(final CompletionStage<? extends T>... promises)`
8080

81-
Returns a promise that is completed normally when any CompletionStage passed as parameters is completed normally (race is possible); if all promises completed exceptionally, then resulting promise is completed exceptionally as well
81+
Returns a promise that is completed normally when any `CompletionStage` passed as parameters is completed normally (race is possible); if all promises completed exceptionally, then resulting promise is completed exceptionally as well
8282

8383
`public static <T> Promise<T> anyStrict(CompletionStage<? extends T>... promises)`
8484

85-
Returns a promise that is completed normally when any CompletionStage passed as parameters is completed normally (race is possible); if any promise completed exceptionally before first result is available, then resulting promise is completed exceptionally as well (unlike non-Strict variant, where exceptions are ignored if result is available at all)
85+
Returns a promise that is completed normally when any `CompletionStage` passed as parameters is completed normally (race is possible); if any promise completed exceptionally before first result is available, then resulting promise is completed exceptionally as well (unlike non-Strict variant, where exceptions are ignored if result is available at all)
8686

8787
`public static <T> Promise<List<T>> atLeast(int minResultsCount, CompletionStage<? extends T>... promises)`
88-
Generalization of the any method. Returns a promise that is completed normally when at least minResultCount
89-
of CompletionStage-s passed as parameters are completed normally (race is possible); if less than minResultCount of promises completed normally, then resulting promise is completed exceptionally
88+
Generalization of the `any` method. Returns a promise that is completed normally when at least `minResultCount`
89+
of `CompletionStage`-s passed as parameters are completed normally (race is possible); if less than `minResultCount` of promises completed normally, then resulting promise is completed exceptionally
9090

9191
`public static <T> Promise<List<T>> atLeastStrict(int minResultsCount, CompletionStage<? extends T>... promises)`
92-
Generalization of the anyStrict method. Returns a promise that is completed normally when at least minResultCount of CompletionStage-s passed as parameters are completed normally (race is possible); if any promise completed exceptionally before minResultCount of results are available, then resulting promise is completed exceptionally as well (unlike non-Strict variant, where exceptions are ignored if minResultsCount of results are available at all)
92+
Generalization of the `anyStrict` method. Returns a promise that is completed normally when at least `minResultCount` of `CompletionStage`-s passed as parameters are completed normally (race is possible); if any promise completed exceptionally before `minResultCount` of results are available, then resulting promise is completed exceptionally as well (unlike non-Strict variant, where exceptions are ignored if `minResultsCount` of results are available at all)
9393

9494
Additionally, it's possible to convert to `Promise` API ready value:
9595

0 commit comments

Comments
 (0)