tag | 9b74c2b58e5148ce1c155d16018de7b9aefa0ba1 | |
---|---|---|
tagger | Prashant Varanasi <prashant@uber.com> | Thu Mar 09 23:59:47 2017 -0800 |
object | 3b8db5e93c4c02efbc313e17b2e796b0914a01fb |
v1.1.0
commit | 3b8db5e93c4c02efbc313e17b2e796b0914a01fb | [log] [tgz] |
---|---|---|
author | Anton Tyurin <noxiouz@yandex.ru> | Thu Dec 15 20:56:52 2016 +0100 |
committer | Prashant Varanasi <github@prashantv.com> | Thu Dec 15 11:56:52 2016 -0800 |
tree | 0cf095a2505f9931c6e8c615cdbfb40c8369e9ff | |
parent | 74ca5ec650841aee9f289dce76e928313a37cbc6 [diff] |
Implement Add/Sub for Float64 (#17) Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
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.