What are Race Conditions? Race Conditions Explained with Real Examples & Go Code

preview_player
Показать описание
What are Race Conditions? We have all heard likely heard cryptic explanations, but can't anyone just break it down into some simple examples?

This video does just that! We start with a simple example of going to buy a phone and look at how a race condition might occur with the phone inventory. We then walk through another explicit example using Go code without any goroutines so we can see exactly when each step executes, then we finally start looking at examples with concurrency so you can see exactly how subtle these types of bugs are and why they can be a pain to debug.

Finally, we discuss at a few options for avoiding race conditions so that you can dig into those further as you need.

Here are links to things mentioned in the video, including the source code:

TOC:

5:42 - First code example
Рекомендации по теме
Комментарии
Автор

This is by far the best content I've seen that explains race conditions well to a beginner. Thanks for making this Jon.

gyenabubakar