Justin
07/25/2020, 12:35 AMlaunch {
launch {}
launch {}
launch {}
}.join()
over this?
listOf(
launch {},
launch {},
launch {}
).joinAll()
Either way, why? Thanks!octylFractal
07/25/2020, 12:37 AMcoroutineScope {
launch {}
launch {}
launch {}
}
Justin
07/25/2020, 12:37 AMsikri
07/25/2020, 2:07 PMcoroutineScope
as in previous answer or option 2Jorge Castillo
07/25/2020, 5:23 PMsuspend fun concurrentSum(): Int = coroutineScope {
val one = async { doSomethingUsefulOne() }
val two = async { doSomethingUsefulTwo() }
one.await() + two.await()
}
dekans
07/25/2020, 5:50 PMLukas Lechner
07/29/2020, 2:14 PMlaunch {
launch {}
launch {}
launch {}
}.join()
behaves in the exact same was as
coroutineScope {
launch {}
launch {}
launch {}
}
sikri
07/29/2020, 3:42 PMjoin
in option 1