Go for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists Goroutines make concurrency cheap, and that is exactly why services accumulate concurrency bugs: a counter updated from many requests, a map shared between handlers, a goroutine started per request that…
Go for DevOps: Data Races, the Race Detector, Concurrent Map Crashes, Deadlocks and Goroutine Leaks
Reproduce and diagnose the four classic Go concurrency bugs with real output: a data race and what -race reports, three ways to fix it, the fatal concurrent map writes, a deadlock message, and 900 leaked goroutines measured with runtime.NumGoroutine and fixed with a buffered channel or a context.
Sign in free to read this script, along with the rest of the library.
Sign in free