go/src/sync
Changkun Ou d5a5a13ad9 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>
2021-11-11 04:41:56 +00:00
..
atomic all: remove more leftover // +build lines 2021-11-06 10:24:44 +00:00
cond.go
cond_test.go
example_pool_test.go
example_test.go sync: use example.com for url in ExampleWaitGroup 2021-10-09 14:53:12 +00:00
export_test.go
map.go sync: clarify the validity to call Map methods inside Range 2021-11-11 04:41:56 +00:00
map_bench_test.go
map_reference_test.go
map_test.go sync: clarify the validity to call Map methods inside Range 2021-11-11 04:41:56 +00:00
mutex.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
mutex_test.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
once.go
once_test.go
pool.go
pool_test.go sync: add PoolStarvation benchmark 2021-11-01 19:42:30 +00:00
poolqueue.go
runtime.go
runtime2.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
runtime2_lockrank.go all: go fix -fix=buildtag std cmd (except for bootstrap deps, vendor) 2021-10-28 18:17:57 +00:00
runtime_sema_test.go
rwmutex.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
rwmutex_test.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
waitgroup.go sync: avoid a dynamic check in WaitGroup on 64-bit architectures 2021-10-19 18:21:38 +00:00
waitgroup_test.go sync: remove TestWaitGroupMisuse2 and TestWaitGroupMisuse3 2021-10-14 17:38:39 +00:00