"coroutines are a great solution to two problems:
Long-running tasks are tasks that take too long to block the main thread.
Main-safety allows you to ensure that any suspend function can be called from the main thread.
Coroutines build upon regular functions by adding two new operations. In addition to invoking (or call) and return, coroutines add suspend and resume.
Suspend and resume work together to replace callbacks.
Coroutines will run on the main thread, and suspend does not mean background"https://medium.com/androiddevelopers/coroutines-on-android-part-i-getting-the-background-3e0e54d20bb