spotify / completable-futures

Utilities for working with futures in Java 8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to join multiple list

JasonHuangHuster opened this issue · comments

CompletableFutures.successfulAsList(completableFutures, f -> null) .thenRunAsync(flexExchangeTaskCFuture, CommonExecutorConfiguration.HOME_PAGE_EXECUTOR) .thenRunAsync(backpopRunnable, CommonExecutorConfiguration.HOME_PAGE_EXECUTOR) .thenRunAsync(noActiveSerialRunnable, CommonExecutorConfiguration.HOME_PAGE_EXECUTOR) .get(400, TimeUnit.MILLISECONDS);

as you can see , i have a list of completableFuture that can run in parallel , and three sub task must run after the list , but the three sub task could run in parallel . so can i join multiple list ? like :

CompletableFutures.successfulAsList(listA, f -> null).successfulAsList(listB, f -> null).get(400, TimeUnit.MILLISECONDS);

btw , this lib is really awesome ! tks for your hard work :D