tag | 870163a1121a1f54715c3467899c302aadd1f9ac | |
---|---|---|
tagger | Prashant Varanasi <prashant@uber.com> | Mon Jul 18 13:41:41 2016 -0700 |
object | 0c9e689d64f004564b79d9a663634756df322902 |
1.0.0 release with atomic ints and strings
commit | 0c9e689d64f004564b79d9a663634756df322902 | [log] [tgz] |
---|---|---|
author | Prashant Varanasi <github@prashantv.com> | Mon Jul 18 13:38:59 2016 -0700 |
committer | GitHub <noreply@github.com> | Mon Jul 18 13:38:59 2016 -0700 |
tree | d373c6bc7112d7b4538e306fd671b125a67998ce | |
parent | 16e575a521a0ca0828d222accaa6b59c0074a85f [diff] | |
parent | e59e67d981b9f1300e10a72bd0de1b3f150ff802 [diff] |
Merge pull request #10 from uber-go/unexport Use unexported field name instead of embedding
Simple numeric wrappers to enforce atomic access.
go get -u github.com/uber-go/atomic
The standard library‘s sync/atomic
is powerful, but it’s easy to forget which variables must be accessed atomically. uber-go/atomic
preserves all the functionality of the standard library, but wraps the primitive numeric 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.