commit | 54f72d32435d760d5604f17a82e2435b28dc4ba5 | [log] [tgz] |
---|---|---|
author | Grayson Koonce <grayson.koonce@gmail.com> | Tue Aug 29 15:32:23 2017 -0700 |
committer | Prashant Varanasi <github@prashantv.com> | Tue Aug 29 15:32:23 2017 -0700 |
tree | c6104598d9c47a9d24afcec31dfc993f490efd2c | |
parent | 70bd1261d36be490ebd22a62b385a3c5d23b6240 [diff] |
Test Go 1.9 (#31)
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.