Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.github/ | H | 01-May-2019 | - | |||
scripts/ | H | 01-May-2019 | - | |||
.codecov.yml | H A D | 01-May-2019 | 763 | |||
.gitignore | H A D | 01-May-2019 | 90 | |||
.travis.yml | H A D | 01-May-2019 | 421 | |||
Makefile | H A D | 01-May-2019 | 1 KiB | |||
README.md | H A D | 01-May-2019 | 1.2 KiB | |||
atomic.go | H A D | 01-May-2019 | 9.2 KiB | |||
atomic_test.go | H A D | 01-May-2019 | 6.6 KiB | |||
error.go | H A D | 01-May-2019 | 1.9 KiB | |||
error_test.go | H A D | 01-May-2019 | 1.9 KiB | |||
example_test.go | H A D | 01-May-2019 | 1.4 KiB | |||
glide.lock | H A D | 01-May-2019 | 494 | |||
glide.yaml | H A D | 01-May-2019 | 117 | |||
stress_test.go | H A D | 01-May-2019 | 5.5 KiB | |||
string.go | H A D | 01-May-2019 | 1.7 KiB | |||
string_test.go | H A D | 01-May-2019 | 1.6 KiB |
README.md
1# atomic [![GoDoc][doc-img]][doc] [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov] [![Go Report Card][reportcard-img]][reportcard] 2 3Simple wrappers for primitive types to enforce atomic access. 4 5## Installation 6`go get -u go.uber.org/atomic` 7 8## Usage 9The standard library's `sync/atomic` is powerful, but it's easy to forget which 10variables must be accessed atomically. `go.uber.org/atomic` preserves all the 11functionality of the standard library, but wraps the primitive types to 12provide a safer, more convenient API. 13 14```go 15var atom atomic.Uint32 16atom.Store(42) 17atom.Sub(2) 18atom.CAS(40, 11) 19``` 20 21See the [documentation][doc] for a complete API specification. 22 23## Development Status 24Stable. 25 26___ 27Released under the [MIT License](LICENSE.txt). 28 29[doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg 30[doc]: https://godoc.org/go.uber.org/atomic 31[ci-img]: https://travis-ci.com/uber-go/atomic.svg?branch=master 32[ci]: https://travis-ci.com/uber-go/atomic 33[cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg 34[cov]: https://codecov.io/gh/uber-go/atomic 35[reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic 36[reportcard]: https://goreportcard.com/report/go.uber.org/atomic 37