How to use the Guava ListenableFuture and the Futures.chain() methods

后端 未结 3 1188
南方客
南方客 2021-01-13 22:10

I have a homework task that requires me to learn how to use the Guava concurrency library.

In the task I have several thread pools, where each one is controlled by a

3条回答
  •  既然无缘
    2021-01-13 22:48

    I don't think Futures.chain() is the answer here, if the primary issue is dealing with task dependency lists. More likely is Futures.allAsList or Futures.successfulAsList, which take multiple futures, and return a future that returns only after all of the input futures have succeeded or failed.

提交回复
热议问题