package
Version:
v1.0.5
Opens a new window with list of versions in this module.
Published: Apr 4, 2016
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package atomic provides simple wrappers around numerics to enforce atomic
access.
Int32 is an atomic wrapper around an int32.
NewInt32 creates an Int32.
Add atomically adds to the wrapped int32 and returns the new value.
CAS is an atomic compare-and-swap.
Dec atomically decrements the wrapped int32 and returns the new value.
Inc atomically increments the wrapped int32 and returns the new value.
Load atomically loads the wrapped value.
Store atomically stores the passed value.
Swap atomically swaps the wrapped int32 and returns the old value.
Int64 is an atomic wrapper around an int64.
NewInt64 creates an Int64.
Add atomically adds to the wrapped int64 and returns the new value.
CAS is an atomic compare-and-swap.
Dec atomically decrements the wrapped int64 and returns the new value.
Inc atomically increments the wrapped int64 and returns the new value.
Load atomically loads the wrapped value.
Store atomically stores the passed value.
Swap atomically swaps the wrapped int64 and returns the old value.
Uint32 is an atomic wrapper around an uint32.
NewUint32 creates a Uint32.
Add atomically adds to the wrapped uint32 and returns the new value.
CAS is an atomic compare-and-swap.
Dec atomically decrements the wrapped int32 and returns the new value.
Inc atomically increments the wrapped uint32 and returns the new value.
Load atomically loads the wrapped value.
Store atomically stores the passed value.
Swap atomically swaps the wrapped uint32 and returns the old value.
Uint64 is an atomic wrapper around a uint64.
NewUint64 creates a Uint64.
Add atomically adds to the wrapped uint64 and returns the new value.
CAS is an atomic compare-and-swap.
Dec atomically decrements the wrapped uint64 and returns the new value.
Inc atomically increments the wrapped uint64 and returns the new value.
Load atomically loads the wrapped value.
Store atomically stores the passed value.
Swap atomically swaps the wrapped uint64 and returns the old value.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.