One of the most important things to understand about suspending functions and coroutines is that they don’t block the running thread. This means that whenever you’re in a coroutine and you call a suspend function, it will pause the coroutine, rather than block the thread.
This is something that when I read it, it kind of puzzled me. I’m not sure If it’s me that I don’t quite understand this or the wording in the text is a little misleading. I was under the impression that even if you launch a coroutine and call a suspend function, if the suspend function runs blocking operations, the thread the coroutine is running on will be blocked. So if you launch a coroutine using Dispatchers. Main and you perform a long-running blocking operation, the Main thread would be blocked. Isn’t this the case? Thanks!