go/src/sync
Changkun Ou f07910bd57 sync: document memory model for Swap/CompareAnd{Swap,Delete} in Map
CL 381316 documented the memory model of Map's APIs. However, the newly
introduced Swap, CompareAndSwap, and CompareAndDelete are missing from
this documentation as CL 399094 did not add this info.

This CL specifies the defined read/write operations of the new Map APIs.

For #51972

Change-Id: I519a04040a0b429a3f978823a183cd62e42c90ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/459715
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Changkun Ou <mail@changkun.de>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2023-01-20 19:38:29 +00:00
..
atomic sync/atomic: fix the note of atomic.Store 2023-01-09 18:21:12 +00:00
cond.go sync: clarify Cond.Wait documentation 2022-09-26 21:58:42 +00:00
cond_test.go
example_pool_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
example_test.go sync: use example.com for url in ExampleWaitGroup 2021-10-09 14:53:12 +00:00
export_test.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
map.go sync: document memory model for Swap/CompareAnd{Swap,Delete} in Map 2023-01-20 19:38:29 +00:00
map_bench_test.go sync: remove unused const 2022-12-12 14:30:12 +00:00
map_reference_test.go sync: add new Map method Swap, CompareAndSwap, CompareAndDelete 2022-11-15 17:35:42 +00:00
map_test.go sync: add new Map method Swap, CompareAndSwap, CompareAndDelete 2022-11-15 17:35:42 +00:00
mutex.go runtime, sync, sync/atomic: document happens-before guarantees 2022-06-06 20:48:03 +00:00
mutex_test.go runtime: write much more direct test for semaphore waiter scalability 2022-06-16 21:25:35 +00:00
once.go Revert "sync: convert Once.done to atomic type" 2022-09-07 13:22:04 +00:00
once_test.go
pool.go runtime, sync, sync/atomic: document happens-before guarantees 2022-06-06 20:48:03 +00:00
pool_test.go all: separate doc comment from //go: directives 2022-04-05 17:54:15 +00:00
poolqueue.go all: gofmt -w -r 'interface{} -> any' src 2021-12-13 18:45:54 +00:00
runtime.go runtime: make the wait reason for a g blocked on a mutex more specific 2022-09-16 16:32:27 +00:00
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 runtime: make the wait reason for a g blocked on a mutex more specific 2022-09-16 16:32:27 +00:00
rwmutex_test.go sync: add Mutex.TryLock, RWMutex.TryLock, RWMutex.TryRLock 2021-10-29 17:13:13 +00:00
waitgroup.go sync: use atomic.Uint64 for WaitGroup state 2022-08-19 01:34:22 +00:00
waitgroup_test.go sync: remove TestWaitGroupMisuse2 and TestWaitGroupMisuse3 2021-10-14 17:38:39 +00:00