commit | 9e99152552a6ce13fa3b2ce4a9c4fb117cca4506 | [log] [tgz] |
---|---|---|
author | Prashant Varanasi <github@prashantv.com> | Thu Oct 27 09:36:08 2016 -0700 |
committer | GitHub <noreply@github.com> | Thu Oct 27 09:36:08 2016 -0700 |
tree | 6d82d8179a5e10e65f44be52dfe631f694fa1717 | |
parent | 0ab99594f786f555b22583d379c0c051e9350ccc [diff] |
Fix Go tip errors with self-import (#14)
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.