route/vendor/go.uber.org/atomic
Cadey Ratio 50c1deaa7d
change from vendor to dep
2017-10-06 08:29:20 -07:00
..
.github change from vendor to dep 2017-10-06 08:29:20 -07:00
scripts change from vendor to dep 2017-10-06 08:29:20 -07: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).