You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
mleku 51f04f5f60
implemented event and req
4 months ago
..
internal implemented event and req 4 months ago
tools implemented event and req 4 months ago
.codecov.yml implemented event and req 4 months ago
CHANGELOG.md implemented event and req 4 months ago
LICENSE implemented event and req 4 months ago
Makefile implemented event and req 4 months ago
README.md implemented event and req 4 months ago
assert_test.go implemented event and req 4 months ago
bool.go implemented event and req 4 months ago
bool_ext.go implemented event and req 4 months ago
bool_test.go implemented event and req 4 months ago
bytes.go implemented event and req 4 months ago
bytes_ext.go implemented event and req 4 months ago
bytes_test.go implemented event and req 4 months ago
doc.go implemented event and req 4 months ago
duration.go implemented event and req 4 months ago
duration_ext.go implemented event and req 4 months ago
duration_test.go implemented event and req 4 months ago
error.go implemented event and req 4 months ago
error_ext.go implemented event and req 4 months ago
error_test.go implemented event and req 4 months ago
example_test.go implemented event and req 4 months ago
float32.go implemented event and req 4 months ago
float32_ext.go implemented event and req 4 months ago
float32_test.go implemented event and req 4 months ago
float64.go implemented event and req 4 months ago
float64_ext.go implemented event and req 4 months ago
float64_test.go implemented event and req 4 months ago
gen.go implemented event and req 4 months ago
int32.go implemented event and req 4 months ago
int32_test.go implemented event and req 4 months ago
int64.go implemented event and req 4 months ago
int64_test.go implemented event and req 4 months ago
nocmp.go implemented event and req 4 months ago
nocmp_test.go implemented event and req 4 months ago
pointer_test.go implemented event and req 4 months ago
stress_test.go implemented event and req 4 months ago
string.go implemented event and req 4 months ago
string_ext.go implemented event and req 4 months ago
string_test.go implemented event and req 4 months ago
time.go implemented event and req 4 months ago
time_ext.go implemented event and req 4 months ago
time_test.go implemented event and req 4 months ago
uint32.go implemented event and req 4 months ago
uint32_test.go implemented event and req 4 months ago
uint64.go implemented event and req 4 months ago
uint64_test.go implemented event and req 4 months ago
uintptr.go implemented event and req 4 months ago
uintptr_test.go implemented event and req 4 months ago
unsafe_pointer.go implemented event and req 4 months ago
unsafe_pointer_test.go implemented event and req 4 months ago
value.go implemented event and req 4 months ago
value_test.go implemented event and req 4 months ago

README.md

atomic

Simple wrappers for primitive types to enforce atomic access.

Installation

$ go get -u github.com/mleku/nodl/pkg/atomic@latest

Usage

The standard library's sync/atomic is powerful, but it's easy to forget which variables must be accessed atomically. github.com/mleku/nodl/pkg/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.CompareAndSwap(40, 11)

See the [documentation][doc] for a complete API specification.

Development Status

Stable.


Released under the MIT License.