Future
ListenableFuture
ClosingFuture.submit(ClosingCallable, Executor)
ClosingFuture.from(dev.mccue.guava.concurrent.ListenableFuture<V>)
Future
s of closeable types is dangerous in general because the underlying value may never be closed if theFuture
is canceled after its operation begins. Consider replacing code that createsListenableFuture
s of closeable types, including those that pass them to this method, withClosingFuture.submit(ClosingCallable, Executor)
in order to ensure that resources do not leak. Or, to start a pipeline with aListenableFuture
that doesn't create values that should be closed, useClosingFuture.from(dev.mccue.guava.concurrent.ListenableFuture<V>)
.