Open eucalypto opened 3 years ago
Kotlin Coroutines must be started in a scope. This is handy because once the scope is cancelled, all the child coroutines are cancelled as well.
AndroidX offers pre-defined coroutine contexts:
See this nice article: https://vladsonkin.com/android-coroutine-scopes-how-to-handle-a-coroutine/
The question is: On what threads do those coroutines run?
Answer:
GlobalScope : DefaultDispatcher (background thread?) LifecycleScope : main thread (UI) ViewModelScope : main thread (UI)
This project is to simply try out different small stuff to see how it works - like a sandbox.