finds.dev

smallnest/dive-to-gosync-workshop

深入Go并发编程研讨课

View on GitHub

★ 1,611Goupdated Apr 2024

// the take

A Chinese-language workshop repo by smallnest (a well-known, prolific Go author) walking through Go concurrency pitfalls: standard sync primitives, atomics, channel patterns, the memory model, distributed sync primitives, and classic concurrency problems. It's aimed at intermediate-to-advanced Go developers who already know the basics and want to see where things actually break.

Pairs broken and fixed implementations side by side in several modules (e.g. mutex/err_reentrant_lock next to mutex/no_err), which is a much better teaching device than isolated code snippets. Goes past stdlib sync into real distributed primitives - etcd-backed locks, leader election, STM - and compares three separate rate limiter libraries (juju, uber, x/time) rather than just picking one. Classic concurrency problems (dining philosophers, barbershop, H2O) each have multiple numbered solution variants showing incremental fixes, which is useful for seeing why a naive answer fails.

Everything is in Chinese - comments, README, variable names in places - so it's only fully useful if you read Chinese; the code itself is simple enough to follow but you lose the explanatory value. There's no accompanying write-up, slide deck, or video in the repo itself, just bare .go files, so a chunk of the pedagogical intent is implicit and depends on having attended the actual workshop. Last pushed April 2024 with no indication it's maintained going forward, and a few submodules carry their own go.mod with likely-stale dependency pins. None of this is production code - it's teaching material, so don't go looking for anything here you'd vendor into a real service.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,611
Forks
237
Language
Go
Last commit
19 Apr 2024

// nearby

If dive-to-gosync-workshop isn't quite it.

All repos →