haroldadmin
06/28/2019, 5:22 PMCoroutine Scope
interface in it? There will be no lifecycle callback to cancel the running coroutines in this scope, though. Since a single instance of this class will be shared with the entire application, any coroutines launched in this scope will be equivalent to launching them in the global scope. So should I just avoid the ceremony and use GlobalScope in this class?louiscad
06/28/2019, 6:06 PMval AppScope = CoroutineScope(Dispatchers.Main)
You can then use if for coroutines that are scoped to the entire process. Beware of what you launch there though as no cancellation would take place right after the user leaves the UI.haroldadmin
06/28/2019, 6:13 PMAppScope
serve the same purpose as GlobalScope?louiscad
06/28/2019, 6:38 PMGlobalScope
runs on the multithreaded Dispatchers.Default
. Depends on what you're calling.haroldadmin
06/28/2019, 7:01 PM