I have an application that has bunch of threads(around 5) making calls to a Network resource. I have a future for all threads and if one of thread returns the result I am fine. Is there an efficient way of doing this in java. Right now I am doing
for(future : futureList) {
future.get(). // This is blocking.
}
I am looking for a way of getting the results of each future as soon as its done.