Skip to content

L13: Coroutines vs Traditional Asynchrony

In this lesson we will explore:

  • Deep Theory: Operating system threads (Java Threads) vs Coroutines (lightweight threads), non-blocking suspension vs thread blocking, and structured concurrency.
  • Under the Hood: Memory footprint comparison on the JVM (~1 MB stack per OS thread vs tens of bytes per coroutine) and how the JVM schedules coroutines across underlying worker thread pools.
  • Incremental Lab (AI Chat CLI): Profiling I/O blocking in the terminal console and designing cooperative concurrent background tasks.