aminal/vendor/go.uber.org/atomic
Liam Galvin e5e7d09656 relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00
..
.github relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00
scripts relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00
.codecov.yml initial gui base 2018-06-28 12:26:48 +01:00
.gitignore initial gui base 2018-06-28 12:26:48 +01:00
.travis.yml initial gui base 2018-06-28 12:26:48 +01:00
LICENSE.txt initial gui base 2018-06-28 12:26:48 +01:00
Makefile initial gui base 2018-06-28 12:26:48 +01:00
README.md initial gui base 2018-06-28 12:26:48 +01:00
atomic.go initial gui base 2018-06-28 12:26:48 +01:00
atomic_test.go relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00
example_test.go relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00
glide.lock initial gui base 2018-06-28 12:26:48 +01:00
glide.yaml initial gui base 2018-06-28 12:26:48 +01:00
stress_test.go relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00
string.go initial gui base 2018-06-28 12:26:48 +01:00
string_test.go relocated font package and tidied up font rendering 2018-09-01 19:55:25 +01:00

README.md

atomic GoDoc Build Status Coverage Status Go Report Card

Simple wrappers for primitive types to enforce atomic access.

Installation

go get -u go.uber.org/atomic

Usage

The standard library's sync/atomic is powerful, but it's easy to forget which variables must be accessed atomically. go.uber.org/atomic preserves all the functionality of the standard library, but wraps the primitive types to provide a safer, more convenient API.

var atom atomic.Uint32
atom.Store(42)
atom.Sub(2)
atom.CAS(40, 11)

See the documentation for a complete API specification.

Development Status

Stable.


Released under the [MIT License](LICENSE.txt).