commit | 70bd1261d36be490ebd22a62b385a3c5d23b6240 | [log] [tgz] |
---|---|---|
author | Bill Fumerola <billf@uber.com> | Tue May 09 15:23:09 2017 -0700 |
committer | bill fumerola <billf@mu.org> | Wed Jul 19 18:46:50 2017 -0400 |
tree | 9f63778cd3bcf58068d7d756ec213bb839e15be0 | |
parent | 16b44f14f0990d358f2ba3191ff8e7c44c9f0bef [diff] |
Use stress tests for benchmarks
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.