Slide 108
Slide 108 text
Concurrency with coroutines
suspend fun placeOrder(order: Order): Response =
coroutineScope {
val account = async { accountService.loadAccount(order) }
val margin = async { marginService.loadMargin(order) }
validateOrder(order, account.await(), margin.await())
}
Waits for completion of all children