Concurrency for beginners
summary
Implements MergeSort (O(n log n)) first sequentially, then with goroutines + WaitGroup which still blocks and slows because it waits for both halves, then reworks it to stream sorted elements via channels as streaming pipes to merge without full-buffer waits; explains channel semantics (sender/receiver, zero buffer blocks, close signals). Describes a production CLI that talks to multiple backends taking 5–10 minutes each (30–60m total) and solves progress reporting by building per-backend channels that the front end aggregates with no extra DB or logging.
AI-written summary · about








