Namespace: go.std.sync.atomic




Provides a low-level interface to the sync/atomic package.

Package atomic provides low-level atomic memory primitives
useful for implementing synchronization algorithms.

These functions require great care to be used correctly.
Except for special, low-level applications, synchronization is better
done with channels or the facilities of the sync package.
Share memory by communicating;
don't communicate by sharing memory.

The swap operation, implemented by the SwapT functions, is the atomic
equivalent of:

old = *addr
*addr = new
return old

The compare-and-swap operation, implemented by the CompareAndSwapT
functions, is the atomic equivalent of:

if *addr == old {
*addr = new
return true
return false

The add operation, implemented by the AddT functions, is the atomic
equivalent of:

*addr += delta
return *addr

The load and store operations, implemented by the LoadT and StoreT
functions, are the atomic equivalents of "return *addr" and
"*addr = val".




Constants are variables with :const true in their metadata. Joker currently does not recognize them as special; as such, it allows redefining them or their values.


Functions, Macros, and Special Forms