]> Cypherpunks repositories - gostls13.git/commit
sync: clarify the validity to call Map methods inside Range
authorChangkun Ou <hi@changkun.de>
Mon, 26 Jul 2021 08:56:30 +0000 (10:56 +0200)
committerIan Lance Taylor <iant@golang.org>
Thu, 11 Nov 2021 04:41:56 +0000 (04:41 +0000)
commitd5a5a13ad987db9bcdda8c6cecb84ed8583ea68d
tree437951e47c5a43edea5db089e1d752d1c810e4f9
parent3949faf72e8285622ebfdf3bd573125dcd5453d2
sync: clarify the validity to call Map methods inside Range

This change clarifies that calling all Map methods inside the callback
of Range is allowed. For further assurance, a nested range call test
is also added.

Fixes #46399

Change-Id: I0a766a5c1470e6b573ec35df1ccd62b2e46f1561
Reviewed-on: https://go-review.googlesource.com/c/go/+/337389
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Ian Lance Taylor <iant@golang.org>
src/sync/map.go
src/sync/map_test.go