A deep, Go-first guide
Go Concurrency, demystified
From the failure modes you must design against to the runtime that schedules it all — goroutines,
channels, select, the sync package, the memory model, context, and the M:N
scheduler. Grounded in Concurrency in Go, with diagrams and runnable code on every page.
Mark a topic “learned” on its page and watch the bars fill.
Skill map
Learned nodes light up — the glowing one is your next step. Click any node to jump in.
Foundations
The hard truths first — what concurrency is, why it bites, and the failure modes (races, deadlock, starvation) you must design against.
Concurrency is structure (independent activities); parallelism is simultaneous execution. CSP, GOMAXPROCS, channels vs mutexes, and Amdahl's law.
✦ Complete · ⏱ 12 min 2 · Intermediate Race Conditions & AtomicityWhat a data race is, why i++ isn't atomic, why time.Sleep never fixes it, the race detector, and the three real fixes: mutex, channel, atomic.
✦ Complete · ⏱ 15 min 3 · Intermediate Deadlock, Livelock & StarvationThe three ways concurrent programs stop making progress — the Coffman conditions, Go's deadlock detector and its limits, lock ordering, and fixes.
✦ Complete · ⏱ 10 minBuilding Blocks
The primitives: goroutines, channels, select, the sync package, atomics, and the memory model that makes them safe.
Go's lightweight, runtime-scheduled concurrent functions — the fork-join model, their tiny cost, M:N scheduling, and how to avoid leaks.
✦ Complete · ⏱ 12 min 5 · Beginner ChannelsTyped conduits that synchronize goroutines — direction, buffering, ownership, closing, and the axioms table that explains every behavior.
✦ Complete · ⏱ 11 min 6 · Intermediate selectWait on multiple channel operations at once — the basis of timeouts, cancellation, non-blocking I/O, fan-in, and the event loop.
✦ Complete · ⏱ 9 min 7 · Intermediate The sync PackageMutex, RWMutex, WaitGroup, Once, Cond and Pool — the lower-level primitives for guarding shared state, plus the copylocks rule and mutex-vs-channel guidance.
✦ Complete · ⏱ 12 min 8 · Intermediate sync/atomicLock-free single-word operations — the typed atomic.Int64/Bool/Pointer, when atomics beat a mutex, compare-and-swap loops, and snapshot swaps.
✦ Complete · ⏱ 8 min 9 · Advanced The Go Memory ModelHappens-before — the rules that decide when one goroutine is guaranteed to see another goroutine's writes.
✦ Complete · ⏱ 10 minCoordination & Scale
Putting the pieces together at scale — context cancellation, rate limiting, and propagating errors across goroutines.
Propagating cancellation, deadlines and request-scoped values across API boundaries — the four constructors and the conventions that keep it sane.
✦ Complete · ⏱ 9 min 11 · Intermediate Rate LimitingControl how fast work happens — the token-bucket algorithm, a ticker limiter, channel semaphores for concurrency, golang.org/x/time/rate, and backpressure.
✦ Complete · ⏱ 9 min 12 · Intermediate Errors Across GoroutinesA goroutine can't return an error to its caller — propagate failures with the Result pattern, first-error cancellation, errgroup, and per-goroutine recover.
✦ Complete · ⏱ 10 minThe Runtime
Under the hood — the M:N scheduler, work-stealing, GOMAXPROCS, the concurrent GC, and how goroutine stacks grow.
The M:N scheduler — G/M/P, local and global run queues, work-stealing, syscall handoff, the netpoller, preemption, and GOMAXPROCS.
✦ Complete · ⏱ 13 min 14 · Advanced Garbage Collector & StacksThe concurrent tri-color GC, write barrier, GOGC and GOMEMLIMIT, growable goroutine stacks, escape analysis, and sync.Pool.
✦ Complete · ⏱ 12 minConcurrency Patterns
The composable recipes built from these primitives — pipelines, worker pools, fan-out/in, errgroup and safe cancellation. (Part of the Design Patterns track.)
Process a stream of data through a series of stages connected by channels, where each stage is a goroutine.
✦ Complete · ⏱ 4 min 26 · Intermediate Fan-out / Fan-inDistribute work across multiple goroutines (fan-out) and merge their results back into one stream (fan-in).
✦ Complete · ⏱ 3 min 27 · Beginner Worker PoolBound concurrency by feeding jobs to a fixed number of long-lived worker goroutines.
✦ Complete · ⏱ 3 min 28 · Beginner GeneratorProduce a stream of values from a goroutine over a channel, lazily and on demand.
✦ Complete · ⏱ 3 min 29 · Intermediate Or-done ChannelWrap a value stream so that ranging over it also stops cleanly the moment a cancellation signal fires.
✦ Complete · ⏱ 2 min 30 · Intermediate Context & CancellationPropagate cancellation, deadlines, and request-scoped values across API boundaries and goroutine trees with context.Context.
✦ Complete · ⏱ 3 min 31 · Intermediate SemaphoreLimit how many goroutines may run a section of code (or hold a resource) at the same time.
✦ Complete · ⏱ 2 min 32 · Intermediate errgroupRun a group of goroutines, wait for them all, capture the first error, and cancel the rest automatically.
✦ Complete · ⏱ 2 min 33 · Intermediate Pub/SubBroadcast events to many dynamic subscribers through a broker, decoupling producers from consumers.
✦ Complete · ⏱ 3 minRevise
🐹 The two Go proverbs to keep in mind
“Don't communicate by sharing memory; share memory by communicating.” And: “Concurrency is not parallelism.” Almost everything here is a consequence of taking those two seriously.