This easy-to-read, hands-on guide demystifies concurrency concepts like threading, asynchronous programming, and parallel processing in any language.
Perplexed by concurrency? Don’t be. This engaging, fully-illustrated beginner’s guide gets you writing the kind of high-performance code your apps deserve. Inside, you’ll find thorough explanations of concurrency’s core concepts—all explained with interesting illustrations, insightful examples, and detailed techniques you can apply to your own projects.
In Grokking Concurrency you will:
Get up to speed with the core concepts of concurrency, asynchrony, and parallel programmingLearn the strengths and weaknesses of different hardware architecturesImprove the sequential performance characteristics of your softwareSolve common problems for concurrent programmingCompose patterns into a series of practices for writing scalable systemsWrite and implement concurrency systems that scale to any size
Discover effective concurrency practices that will help you leverage multiple cores, excel with high loads, handle terabytes of data, and continue working after hardware and software failures. The core concepts in this guide will remain eternally relevant, whether you’re building web apps, IoT systems, or handling big data.
Purchase of the print book includes a free eBook in PDF and ePub formats from Manning Publications.
About the technology
Concurrency is an approach to running computer programs efficiently by separating them into tasks that can execute independently. This basic idea makes it possible to accelerate game graphics, train large AI models, rapidly scale web applications, streamline big data processing, and much more. Concurrency can get complicated, so this book gets you started gently with interesting examples, entertaining illustrations, and easy-to-follow Python code.
About the book
Grokking Concurrency is a perfectly paced introduction to the fundamentals of concurrent, parallel, and asynchronous programming. In it, you’ll learn the practices you’ll need to program multicore processors, GPUs, and other high-performance systems. Author Kirill Bobrov skips the math, jargon, and academic language and concentrates on clear, plain-English explanations.
What’s inside
Writing and running concurrent programsPatterns for performance, scalability, and resilienceChoosing the right hardwareAsynchronous communication
About the reader
Examples in Python. No prior experience with concurrency or high-performance computing required.
About the author
Kirill Bobrov is a software engineer with a passion for data engineering.
Table of Contents
Part 1 The Octopus Orchestra: Introduction to a Symphony of Concurrency
1 Introducing concurrency
2 Serial and parallel execution
3 How computers work
4 Building blocks of concurrency
5 Interprocess communication
Part 2 the Many Tentacles of Concurrency: Multitasking, Decomposition,
and Synchronization
6 Multitasking
7 Decomposition
8 Solving concurrency problems: Race conditions and synchronization
9 Solving concurrency problems: Deadlocks and starvation
Part 3 Asynchronous Octopuses: a Pizza-making Tale of Concurrency
10 Nonblocking I/O
11 Event-based concurrency
12 Asynchronous communication
13 Writing concurrent applications
From the Publisher





Publisher : Manning
Publication date : February 6, 2024
Language : English
Print length : 304 pages
ISBN-10 : 1633439771
ISBN-13 : 978-1633439771
Item Weight : 1.1 pounds
Dimensions : 7.38 x 0.5 x 9.25 inches
Best Sellers Rank: #226,206 in Books (See Top 100 in Books) #76 in Computer Programming Languages #80 in Microsoft Programming (Books) #139 in Python Programming
Customer Reviews: 4.5 4.5 out of 5 stars (17) var dpAcrHasRegisteredArcLinkClickAction; P.when(‘A’, ‘ready’).execute(function(A) { if (dpAcrHasRegisteredArcLinkClickAction !== true) { dpAcrHasRegisteredArcLinkClickAction = true; A.declarative( ‘acrLink-click-metrics’, ‘click’, { “allowLinkDefault”: true }, function (event) { if (window.ue) { ue.count(“acrLinkClickCount”, (ue.count(“acrLinkClickCount”) || 0) + 1); } } ); } }); P.when(‘A’, ‘cf’).execute(function(A) { A.declarative(‘acrStarsLink-click-metrics’, ‘click’, { “allowLinkDefault” : true }, function(event){ if(window.ue) { ue.count(“acrStarsLinkWithPopoverClickCount”, (ue.count(“acrStarsLinkWithPopoverClickCount”) || 0) + 1); } }); });
6 reviews for Grokking Concurrency
Add a review
Original price was: $49.99.$41.99Current price is: $41.99.


Yo –
It is a great book, very informative and easy to follow
It’s a great book with fantastic illustrations. These are fundamental concepts to create software that scales. The book illustrates theory with real-life examples and practical ideas.The author does a great job simplifying complex concepts. Give it a try and learn how to build great software.
Jonathan Reeves –
Great Resource for Understanding Concurrency
My husband had this to say about this book: “The book really breaks down the concepts of Concurrency in easy to understand terms. I don’t know if there is a better resource out there currently. I have tried for years to understand what makes a concurrency a great technique to use/learn and this book I feel answered that question for me. You owe it to yourself to get a copy of this book if you find yourself in the same boat as me.”
corona79 –
a much needed book
This book does much to demystify concurrency, which, as the author notes, seems to be treated as some sort of Hidden Knowledge that is to be made available only to a select few. Happily, it is generally free of the typos and vague or contradictory language common in computer texts. The notable exception is the output shown in chapter 4 for child_processes.py. Lines like “Parent : Child’s PID: 73554” appear , which is interesting since no such print() call exists in the code, and even if it did, it would be useless. Unlike fork(), the Process class does not give immediate access to the child’s PID – there is no such thing as a getcpid() system call.To prove that concurrency deserves its rather murky reputation, I ran the Chapter 8 program race_condition.py in Google Colab, and the output was what would be expected if no race condition existed. There is call to setswitchinterval() that is noted to be key to getting interruptions, so I both increased and decreased the value of THREAD_DELAY, but the problem that there was no problem persisted.There is one issue with Python that was a little annoying. Basically, the typing module is obsolete, as its functionality is largely found in collections.abc. You often see “import typing as T” in the text. It could be replaced – if necessary – with “import collections.abc as C”. I stress “if” because in recent Python versions, built-in types can be used directly in type hints. So, “from typing import List” becomes extraneous, as “list” will now work where “List” was once needed.
Kindle Customer –
Solid intro to an important topic
I hesitate to use the word simple with this book, but it is the one that fits best. And it is the right approach to take with a topic that has grown over the years to be as complex as it is. Given a language that supports concurrency, which approach should you take? Read this and then decide with understanding in hand. A good and pleasurable read!
Ezra Schroeder –
Best book to finally learn concurrency–fast!
This book is very accessible. While I have a masters degree in computer science from a top institution, it was mostly focused on data science and machine learning and I had never gotten around to studying concurrency at all. This book was my introduction & I love it!
Reader –
Learn Concurreny through everyday paradigms
This is a gem of a book which provides a good foundation on the concepts for and of concurrency though examples from the real world together with code examples to illustrate the concepts more.