This is only partially correct. `Thread.sleep()` blocks the thread the coroutine was executed on.

Since you use `Dispatchers.Main`, which is backed up by a single thread, you indeed block other coroutines from executing. But with other dispatchers, that use thread pool, the behaviour will look different.

Solutions Architect @Depop, author of “Hands-on Design Patterns with Kotlin” book and “Web Development with Kotlin” course

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store