-
Notifications
You must be signed in to change notification settings - Fork 135
FutureW
johnmcclean-aol edited this page Nov 21, 2016
·
7 revisions
CompletableFuture has a non-standard API, FutureW provides a more standard API with all of cyclops-react advanced features.
### CompletableFuture
)
FutureW<Integer> one = FutureW.ofSupplier(()->1);
FutureW<Integer> two = FutureW.ofSupplier(()->2);
FutureW<Integer> three = FutureW.future(); //started but not complete
FutureW<ListX<Integer>> strings = FutureW.quorum(status -> status.getCompleted() > 1,
,one,two,three);
assertThat(strings.get().size(), is(greaterThan(1)));
oops - my bad