Order the steps
Put the steps of a parallel all-or-nothing load in order.
- Call
awaiton all three - Start each call with
async - Return the combined result
- Open
coroutineScope { }inside the suspend function
Hint 1 of 1
Starting comes before waiting.
Choose an answer, then open Show answer below to check it.
Show answer
Answer: D B A C
- Open
coroutineScope { }inside the suspend function The scope makes sure nothing outlives the function. - Start each call with
asyncEach starts at once, so the calls overlap. - Call
awaiton all three Waiting comes after starting, so total time is the slowest call. - Return the combined result If any call failed, the scope already cancelled the rest and threw.