Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiplexing the Future<> in Java

Tags:

java

I find myself about to write a class that implements Future<T> and stores, inside of itself, a Collection<Future<T>>, acting as an aggregate future for all of its contents.

I wonder: has anyone already done this in some open source library? A bit of googling didn't yield.

like image 557
bmargulies Avatar asked Oct 08 '22 10:10

bmargulies


1 Answers

Depends what you mean by "aggregate future." Perhaps Guava's Futures.allAsList?

like image 116
Louis Wasserman Avatar answered Oct 12 '22 11:10

Louis Wasserman