From 984e81f64e0c8ec67497fde5ea0dcbefcd1e51b1 Mon Sep 17 00:00:00 2001
From: Ian Lance Taylor
Date: Fri, 19 Jan 2018 09:34:24 -0800
Subject: [PATCH] doc/faq: clarify that concurrent maps reads are safe
Fixes #23480
Change-Id: I33b4bdc60b9983ab62d87bfa0ae3ff33304269c0
Reviewed-on: https://go-review.googlesource.com/88515
Reviewed-by: Rob Pike
---
doc/go_faq.html | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/doc/go_faq.html b/doc/go_faq.html
index c038bc46bd..f273688705 100644
--- a/doc/go_faq.html
+++ b/doc/go_faq.html
@@ -479,6 +479,15 @@ as when hosting an untrusted program, the implementation could interlock
map access.
+
+Map access is unsafe only when updates are occurring.
+As long as all goroutines are only readingâlooking up elements in the map,
+including iterating through it using a
+for
range
loopâand not changing the map
+by assigning to elements or doing deletions,
+it is safe for them to access the map concurrently without synchronization.
+
+
Will you accept my language change?
--
2.48.1