mirror of
https://github.com/golang/go.git
synced 2026-06-27 03:11:23 +00:00
sync/atomic: document why not Int16
Fixes golang/go#78781 Change-Id: I8363c57155bccb2a5304d44cfa130e0d9315742b Reviewed-on: https://go-review.googlesource.com/c/go/+/767940 Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
parent
891f4a8711
commit
0af7dbf1e6
1 changed files with 4 additions and 0 deletions
|
|
@ -45,6 +45,10 @@
|
|||
// This definition provides the same semantics as
|
||||
// C++'s sequentially consistent atomics and Java's volatile variables.
|
||||
//
|
||||
// Only a few integer sizes are supported: on many architectures,
|
||||
// atomic operations on non-word-sized integers are inefficient or
|
||||
// infeasible. For example, a [Bool] may be larger than a built-in bool.
|
||||
//
|
||||
// [the Go memory model]: https://go.dev/ref/mem
|
||||
package atomic
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue