Sequential, Concurrent, Parallel
Who it is for: Developers who understand sequential code and want to reason about concurrent work.
Working manuscript · 2027–2028 Edition. The full book is forthcoming; text and illustrations may change.
The words sequential, concurrent, and parallel answer different questions. Sequential work has no overlap. Concurrent work has multiple tasks in progress during an overlapping period. Parallel work executes more than one operation at the same instant. A program can be concurrent without being parallel, and it can use both.
We will develop these distinctions with a batch downloader. Given several URLs, the program fetches each response and performs a small amount of processing. Later versions will use threads, async tasks, queues, and processes, but the first version is an ordinary loop.
Read the chapter
The preview below shows the first 3 pages. The PDF contains the complete 9-page chapter, with selectable text and the original illustrations.
Download sample chapter (PDF) ↓Open PDF in a new tab ↗


Keep exploring Illustrated Concurrency
Draw the order of events and find the bug. Explore threads, asynchronous tasks, locks, and processes through one Python downloader.
See the book outline →Questions or corrections? support@hackerbrewery.com