Animesh Sahu
12/08/2019, 11:02 AMCoroutineScope(context).async{}.await()
or withContext(context) {}
?octylFractal
12/08/2019, 11:04 AMwithContext
will be much more performantAnimesh Sahu
12/08/2019, 11:04 AMoctylFractal
12/08/2019, 11:05 AMCoroutineScope
is literally just a container for a context with extension functions for creating child jobs, creating multiple for a single context is weird but it shouldn't really affect anythingoctylFractal
12/08/2019, 11:05 AMwithContext
has some optimizations such as not dispatching if the new context doesn't change dispatcher, or not suspending / making changes if the context is the exact sameoctylFractal
12/08/2019, 11:06 AMwithContext
doesn't start a new sub-Job, and is properly bound to the current Job lifecycledekans
12/08/2019, 2:17 PMasync
is great for laughing several processing in parallel, then you can await
themgildor
12/09/2019, 9:31 AMCoroutineScope(context).async{}.await()