From b64f6931ecac4ed92bcb7984d0655981e0eb1afc Mon Sep 17 00:00:00 2001 From: Peter Bourgon Date: Tue, 18 May 2021 19:32:43 +0200 Subject: [PATCH] Updated CodeReviewConcurrency (markdown) --- CodeReviewConcurrency.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeReviewConcurrency.md b/CodeReviewConcurrency.md index 36c19d5c..6564641e 100644 --- a/CodeReviewConcurrency.md +++ b/CodeReviewConcurrency.md @@ -122,7 +122,7 @@ Such a race condition could be benign in some cases: for example, the logic betw `Store()` calls computes the value to be cached in the map, and this computation always returns the same result and doesn't have side effects. -> ⚠️ **False information**. There is no such thing as a benign race condition. +> ⚠️ **Potentially misleading information**. "Race condition" can refer to logic errors, like this example, which can be benign. But the phrase is also commonly used to refer to violations of the memory model, which are never benign. If the race condition is not benign, use methods [`sync.Map.LoadOrStore()`]( https://golang.org/pkg/sync/#Map.LoadOrStore) and [`LoadAndDelete()`](