Tolriq
11/28/2018, 11:16 AMelizarov
11/28/2018, 11:18 AMGlobalScope
better describes intent here (of a separate non-scoped background process)elizarov
11/28/2018, 11:20 AMGlobalScope.launch { ... }
and launch { ... withContext(NonCancellable) { ... } .. }
is that the latter also inherits dispatcher, which if likely not something you want in this case.elizarov
11/28/2018, 11:21 AMdbScope
and consistently use it for such tasks to be clear. It could be something like val dbScope = GlobalScope + <http://Dispatchers.IO|Dispatchers.IO>
Tolriq
11/28/2018, 11:23 AM