Gist of Go: Concurrency
Many Go concurrency books and tutorials are like: here's goroutine, here's channel, here's select — use them as you like. Others just throw concurrent patterns at you without really explaining them.
This is not very helpful: the most important thing in concurrent programming is not pure knowledge, but the understanding and ability to apply concurrency primitives.
That's why I've created an interactive book that teaches Go concurrency from the ground up through practical exercises. These exercises are simple enough to be solved with a single page of code yet are closely aligned with real-world scenarios.
Audience and approach • Contents • About the author
Audience and approach
The book is intended for programmers who are already familiar with Go, from language basics to interfaces and errors. You don't need any prior knowledge of goroutines and channels — we'll cover concurrency tools from the ground up.
Since the book targets experienced programmers, I've chosen a presentation style that I prefer: concise, focused, with exercises of moderate difficulty. Maybe you'll like it too.
Concurrent programming is a tricky beast, but I explain complex topics clearly, making them easier to understand. There are lots of examples and no dry theory.
There are dozens of interactive exercises that run directly in the browser. Each problem has an automated test suite that provides immediate feedback and a reference solution with an explanation.
Contents
Part 1. Concurrency basics
- Goroutines
- Channels
- Pipelines
- Time
- Context
- Summary
Part 2. Synchronization
- Wait groups
- Data races
- Race conditions
- Semaphores
- Signaling
- Atomics
- Internals
- Summary
You can read the chapters using the links in the table of contents above, or purchase the book for full access to the interactive exercises (+ a PDF version).
The book is a work in progress (4/12 chapters finished).
Last updated: 2024-12-12
Go version: 1.22
Pre-order for $10 or read online
About the author
I'm Anton Zhiyanov. I work on open source and write interactive technical books.
In 2022 I launched a course on Go concurrency. It now has 250 graduates and an average rating of 5 stars based on 100 student reviews.
This book is based on the original course.
★ Subscribe to keep up with new posts.