Prashant Varanasi 0c9e689d64 Merge pull request #10 from uber-go/unexport
Use unexported field name instead of embedding
2016-07-18 13:38:59 -07:00
2016-05-25 11:04:20 -07:00
2016-05-29 20:54:38 -07:00
2016-05-30 11:10:24 -07:00
2016-05-31 17:23:56 -07:00
2016-05-31 17:23:56 -07:00
2016-05-31 17:14:21 -07:00

atomic GoDoc Build Status Coverage Status

Simple numeric wrappers to enforce atomic access.

Installation

go get -u github.com/uber-go/atomic

Usage

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.

Development Status

Stable.


Released under the [MIT License](LICENSE.txt).
Description
atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][reportcard-img]][reportcard]
Readme 235 KiB
Languages
Go 97.9%
Makefile 2.1%