We break down the difference between
suspension and thread blocking, why JVM file operations are most often blocking, and how this directly affects the choice of coroutine context: where to use
Dispatchers.Default and where to use
Dispatchers.IO. With examples using
withContext,
async, and blocking
Thread.sleep, we show how “accidental I/O on Default” can slow down CPU tasks, and how the discipline “I/O separately, CPU separately” simplifies architecture.