route/vendor/go.uber.org/atomic
Cadey Ratio e3a389dde4 make dep prune things 2017-12-11 10:38:19 -08:00
..
.gitignore change from vendor to dep 2017-10-06 08:29:20 -07:00
.travis.yml change from vendor to dep 2017-10-06 08:29:20 -07:00
LICENSE.txt change from vendor to dep 2017-10-06 08:29:20 -07:00
Makefile change from vendor to dep 2017-10-06 08:29:20 -07:00
README.md change from vendor to dep 2017-10-06 08:29:20 -07:00
atomic.go change from vendor to dep 2017-10-06 08:29:20 -07:00
atomic_test.go change from vendor to dep 2017-10-06 08:29:20 -07:00
example_test.go change from vendor to dep 2017-10-06 08:29:20 -07:00
glide.lock change from vendor to dep 2017-10-06 08:29:20 -07:00
glide.yaml change from vendor to dep 2017-10-06 08:29:20 -07:00
stress_test.go change from vendor to dep 2017-10-06 08:29:20 -07:00
string.go vendor: add new dependencies 2017-01-23 08:04:33 -08:00
string_test.go change from vendor to dep 2017-10-06 08:29:20 -07:00

README.md

atomic GoDoc Build Status Coverage Status

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).