When the created coroutine isCompleted, it will try to synchronously complete the returned Future with the same outcome. This will succeed, barring a race with external cancellation of returned ListenableFuture.
Cancellation is propagated bidirectionally.
See newCoroutineContext for a description of debugging facilities.
Note that the error and cancellation semantics of future are different than async's. In contrast to Deferred, Future doesn't have an intermediate
Cancelling state. If the returned
Future is successfully cancelled, and
block throws afterward, the thrown error is dropped, and getting the
Future's value will throw a
CancellationException with no cause. This is to match the specification and behavior of