v1.1.0
Implement Add/Sub for Float64 (#17)

Signed-off-by: Anton Tiurin <noxiouz@yandex.ru>
3 files changed
tree: 0cf095a2505f9931c6e8c615cdbfb40c8369e9ff
  1. .github/
  2. scripts/
  3. .gitignore
  4. .travis.yml
  5. atomic.go
  6. atomic_test.go
  7. example_test.go
  8. glide.lock
  9. glide.yaml
  10. LICENSE.txt
  11. Makefile
  12. README.md
  13. stress_test.go
  14. string.go
  15. string_test.go
README.md

atomic GoDoc Build Status Coverage Status

Simple wrappers for primitive types to enforce atomic access.

Installation

go get -u go.uber.org/atomic

Usage

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.

Development Status

Stable.