Assuming you launch a coroutines on main/ui thread to display result from an heavy io operation.
launch(Dispatchers.Main) { val result = runBlocking(Dispatchers.IO) { fetchSomething() } Toast.makeText(context, result, Toast.LENGTH_LONG).show()}
or
launch(Dispatchers.Main) { val queue = async(Dispatchers.IO) { fetchSomething() } val result = queue.await() Toast.makeText(context, result, Toast.LENGTH_LONG).show()}