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())
}Discussion 0
Join free to post in the discussion.
Related questions
- Android activity start orderMobile App Developer
- What AndroidManifest.xml is forMobile App Developer
- Sharing text to any appMobile App Developer
- Play Console rejects the build versionMobile App Developer
- lateinit or by lazyMobile App Developer
- A chain of safe callsMobile App Developer
- What !! does on nullMobile App Developer
- What let returnsMobile App Developer