closeAwaitably is intended to be used as a wrapper for
close
.
closeAwaitably is intended to be used as a wrapper for
close
. The underlying f
will be called at most once.
Is this Awaitable ready? In other words: would calling Awaitable.ready block?
Is this Awaitable ready? In other words: would calling Awaitable.ready block?
Support for Await.ready
.
Support for Await.ready
. The use of the implicit permit is an
access control mechanism: only Await.ready
may call this
method.
Support for Await.result
.
Support for Await.result
. The use of the implicit permit is an
access control mechanism: only Await.result
may call this
method.
A mixin to make an com.twitter.util.Awaitable out of a com.twitter.util.Closable.
Use
closeAwaitably
in the definition ofclose
:Note: There is a Java-friendly API for this trait: com.twitter.util.AbstractCloseAwaitably.