commit | 5328d69c76a98d1d21c773653a5a78fa28d89921 | [log] [tgz] |
---|---|---|
author | Prashant Varanasi <github@prashantv.com> | Mon Feb 25 17:13:05 2019 -0800 |
committer | GitHub <noreply@github.com> | Mon Feb 25 17:13:05 2019 -0800 |
tree | 17ed744079a86b9091b2b71a5e0544827bb6f6ff | |
parent | 8dc6146f7569370a472715e178d8ae31172ee6da [diff] |
Simplify lint version select, control via .travis.yml (#46) This is similar to tchannel, see https://github.com/uber/tchannel-go/pull/651 and https://github.com/uber/tchannel-go/blob/dev/.travis.yml
Simple wrappers for primitive types to enforce atomic access.
go get -u go.uber.org/atomic
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.
Stable.
Released under the MIT License.