Race Conditions In Golang
This post is the second in my series of articles on Concurrency in Go. In this post, we’ll understand what a race condition is, the why and how of it, and finally, we see some code that creates a race condition, and then we will learn to fix that race condition with the help of Mutexes. So let’s get started! The What, Why And How Of A Race Condition A race condition in Go occurs when two or more goroutines have shared data and interact with it at the same time....