<@U0FC5HBJN> Note that its not recommended to retu...
# coroutines
r
@dharrigan Note that its not recommended to return a
Deferred<T>
from a suspend function explicitly, like @ross_a showed, simply because you don't need to. If you don't want to block at the call-site just use
async
e.g.
Copy code
val fooDeferred = async {
    aSuspendingFunctionThatGetsAValueFromANetworkAPI()
}

// somewhere down below
fooDeferred.await()
➕ 1