route/vendor/go.uber.org/atomic
Cadey Ratio 792c0a9e81 upgrade all the dependencies 2018-01-03 11:19:49 -08:00
..
.codecov.yml upgrade all the dependencies 2018-01-03 11:19:49 -08:00
.gitignore change from vendor to dep 2017-10-06 08:29:20 -07:00
.travis.yml upgrade all the dependencies 2018-01-03 11:19:49 -08: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 upgrade all the dependencies 2018-01-03 11:19:49 -08:00
atomic.go upgrade all the dependencies 2018-01-03 11:19:49 -08:00
atomic_test.go upgrade all the dependencies 2018-01-03 11:19:49 -08: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 upgrade all the dependencies 2018-01-03 11:19:49 -08:00
string.go upgrade all the dependencies 2018-01-03 11:19:49 -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 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).