Okay. Good. You can do something like: ``` fun ret...
# coroutines
k
Okay. Good. You can do something like:
Copy code
fun retrieveUserInfo(userId: String) = launch(UI) {
  val deferred = async(CommonPool) { api.retrieveUserById(userId) }
  val userInfo = deferred.await()
  // Use userInfo here
}
Meanwhile,
suspend fun
doesn't necessarily block the main thread. Calling the
fun
from a non main thread context for example