Async/Await (Concurrency Model Overview)¶
This folder is about concurrency models generally; async/await is one such model, covered here as an overview bridging into the dedicated, much deeper Async Programming track — read this page for the concurrency-model framing, then go there for the full depth (event loops, coroutines, cancellation, runtimes).
flowchart LR
Junior["Junior: what async/await actually does to control flow"] --> Middle["Middle: cooperative vs. preemptive scheduling"] --> Senior["Senior: why async doesn't help CPU-bound work"]
Senior --> Professional["Professional: async/await as ONE of several concurrency models - see full comparison table"]
flowchart LR
Sync["Synchronous call:\nBLOCKS the thread\nuntil it returns"] -.-.- Async["async/await:\nSUSPENDS this task,\nthread is FREE to run\nsomething else meanwhile"]
Choose a level¶
| Level | Guide | You are done when |
|---|---|---|
| Junior | What async/await does to control flow | You can explain the difference between a blocking call and an awaited call. |
| Middle | Cooperative vs. preemptive scheduling | You can explain why an async task must explicitly yield control, unlike a preemptively-scheduled thread. |
| Senior | Why async doesn't help CPU-bound work | You can explain why wrapping a CPU-heavy function in async def provides no speedup. |
| Professional | Async/await among other concurrency models | You can place async/await alongside actors, CSP, and shared-memory threading in the broader concurrency-model landscape. |
Practice rule¶
Before reaching for async/await, confirm your bottleneck is actually waiting (network, disk, a timer) — not computing. If it's computing, async/await provides zero benefit; you need the parallel- programming track's tools instead.