Concurrency with Clear Boundaries
Choose threads, processes, or async tasks from the workload and design bounded, cancellable operations.
Functions, exceptions, context managers, and iterators.
Choose the right concurrency model (threads, processes, or async tasks) according to your workload, bound parallelism to avoid resource exhaustion, and handle worker failures.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 14.01Threads and I/O4 min
Overlap waiting work while keeping state, ordering, and failure handling explicit.
- 14.02Processes and CPU Work4 min
Use isolated workers for substantial CPU work and account for serialization, startup, and process lifecycle.
- 14.03Async, Await, and Tasks4 min
Understand cooperative scheduling and structure concurrent async operations with explicit task ownership.
- 14.04Cancellation and Concurrency Limits4 min
Make deadlines, cleanup, and backpressure part of a concurrent operation’s contract.
Ready to move on?
Explain your concurrency model choice for a specific task, surface worker failures appropriately, and verify cleanup when work is cancelled or fails.
Open the module self-check