A Journey With Go
Published in

A Journey With Go

Go: Mutex and Starvation

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.

Starvation

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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store