]> Cypherpunks.ru repositories - gostls13.git/commit
runtime, sync, sync/atomic: document happens-before guarantees
authorRuss Cox <rsc@golang.org>
Wed, 26 Jan 2022 21:53:50 +0000 (16:53 -0500)
committerGopher Robot <gobot@golang.org>
Mon, 6 Jun 2022 20:48:03 +0000 (20:48 +0000)
commita71ca3dfbd32faf351ff68bcc26a4d5abd9b06d7
tree0523f7aeacea7089b127ea3a8e5e58dded85fa0e
parent3651a6117e9a88576615c29c4faf7eeec55d7691
runtime, sync, sync/atomic: document happens-before guarantees

A few of these are copied from the memory model doc.
Many are entirely new, following discussion on #47141.
See https://research.swtch.com/gomm for background.

The rule we are establishing is that each type that is meant
to help synchronize a Go program should document its
happens-before guarantees.

For #50859.

Change-Id: I947c40639b263abe67499fa74f68711a97873a39
Reviewed-on: https://go-review.googlesource.com/c/go/+/381316
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Roland Shoemaker <roland@golang.org>
src/runtime/mfinal.go
src/sync/atomic/doc.go
src/sync/cond.go
src/sync/map.go
src/sync/mutex.go
src/sync/once.go
src/sync/pool.go
src/sync/rwmutex.go
src/sync/waitgroup.go