I’ve Guava in my Classpath and want to use ListenableFutures, but currently I don’t know how to submit ListenableFutures or is it currently only possible to use them without an executor in the calling thread? I’ve read that a decorator is available in r10 which isn’t out?
I’ve found Futures.makeListenable(Future<V> future) but I’m not sure if that’s currently the only way how to use ListenableFutures.
kind regards,
Johannes
We improved the
ListenableFutureJavadoc for the forthcoming r10, including adding information about how to obtain an instance of the class. You can see the HEAD version here: http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/util/concurrent/ListenableFuture.htmlThe decorator method you’re interested in is MoreExecutors.listeningDecorator