Lately, I have been actively working with Google Guava and ListenableFutures, and something that I was missing was a way to provide a stream processing handler for future orders. What I represent is an iterable that blocks next () until another future returns.
Before I try to create my own, does it already exist?
Otherwise, I was thinking of using the ListenableFuture callback function to output the results to a BlockingQueue. The goal is to process the return values as soon as they return. Futures.successfulAsList() excellent, but it waits for all the values before returning, and does not allow me to schedule other useful work.
source share