dimsuz
10/26/2021, 10:59 AMJoffrey
10/26/2021, 11:17 AMdimsuz
10/26/2021, 11:28 AMlaunch
and extensions (IIRC), but I've now forgotten about that, need to find and rewatch 🙂Joffrey
10/26/2021, 11:50 AMsuspend
functions are supposed to finish their work before returning (basically they shouldn't launch coroutines that outlive their own execution scope). That's why they often use coroutineScope { ... }
blocks etc to control parallel decomposition of work, but still wait for child coroutines before returning.
OTOH functions that launch coroutines that outlive them should in general not be suspending, and instead they are usually declared as extensions on CoroutineScope
(unless there is a scope already defined as a property in the containing class or something like that)dimsuz
10/26/2021, 2:57 PMephemient
10/26/2021, 3:37 PMjulian
10/27/2021, 12:30 AMdimsuz
10/27/2021, 10:14 AM