Go: Mutex and Starvation

Vincent Blanchon
Sep 13, 2019 · 6 min read
Illustration created for “A Journey With Go”, made from the original Go Gopher, created by Renee French.

ℹ️ This article is based on Go 1.13.

While developing in Golang, a mutex can encounter starvation issues when it consistently tries to acquire a lock that it is never able to get. For this article, we’ll look at a starvation issue affecting Go 1.8 that was solved in Go 1.9.


In order to illustrate a starvation situation with a mutex, I will take the…