Skip to content
RED SAGSkills
medium10 pts · first answer countsandroidcoroutines

Time for two async calls

getProfile() takes 1.0 s and getOrders() takes 1.5 s. How long does load() take?

suspend fun load() = coroutineScope {
    val p = async { getProfile() }
    val o = async { getOrders() }
    Screen(p.await(), o.await())
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions