Join Slack
Powered by
If your you underlying mechanism supports request ...
# coroutines
e
elizarov
03/05/2017, 11:40 AM
If your you underlying mechanism supports request cancellation, then you should use
suspendCancellableCoroutine
. It is a drop-in replacement for
suspendCoroutine
that lets you make supension cancellable. See how
CompeltableFuture.await
is implemented, for example, or
rx.Single.await
.
👍 1
Open in Slack
Previous
Next