Vivek Modi
11/11/2021, 10:21 AMsuspend fun fetchTwoDocs() =
coroutineScope {
val deferredOne = async { fetchDoc(1) }
val deferredTwo = async { fetchDoc(2) }
deferredOne.await()
deferredTwo.await()
}
and what the difference of
viewModelScope.launch { }
or
coroutineScope { }
louiscad
11/11/2021, 10:22 AMVivek Modi
11/11/2021, 10:23 AMlouiscad
11/11/2021, 10:23 AMVivek Modi
11/11/2021, 10:24 AMlouiscad
11/11/2021, 10:24 AMVivek Modi
11/11/2021, 10:24 AM