Grokking Concurrency in Go
0% completed
Common Concurrency Mistakes in Go
An order service ran without a problem for weeks. Then one customer submitted an order with an empty item name, the request returned a validation error, and every request after it hung. The process used no CPU, and the goroutine count rose with each new request. A goroutine dump showed hundreds of goroutines waiting in sync.Mutex.Lock inside the same method.
The cause was one missing line. The method returned its error after locking the mutex and before releasing it, so the lock stayed held. Every later call waited for it forever.
Most concurrency bugs in Go code are not new
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%