All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
atomic.Float32
type for atomic operations on float32
.CompareAndSwap
and Swap
methods to atomic.String
, atomic.Error
,
and atomic.Value
.atomic.Pointer[T]
type for atomic operations on pointers of any
type. This is present only for Go 1.18 or higher, and is a drop-in for
replacement for the standard library's sync/atomic.Pointer
type.CAS
methods on all types in favor of corresponding
CompareAndSwap
methods.Thanks to @eNV25 and @icpd for their contributions to this release.
Float64.Swap
to match int atomic operations.atomic.Time
type for atomic operations on time.Time
values.atomic.Uintptr
type for atomic operations on uintptr
values.atomic.UnsafePointer
type for atomic operations on unsafe.Pointer
values.golang.org/x/{lint, tools}
.golang.org/x/{lint, tools}
.Bool.CAS
and Bool.Toggle
do work correctly together
causing CAS
to fail even though the old value matches.go.uber.org/atomic
import path is supported now.
If you need to use the old import path, please add a replace
directive to
your go.mod
.atomic.Error
type for atomic operations on error
values.atomic.Duration
type for atomic operations on time.Duration
values.atomic.String.Store("")
which caused data races.atomic.Bool.CAS
for compare-and-swap semantics on bools.atomic.String.Store("")
by avoiding an allocation.atomic.Value
from sync/atomic
.Float64
type.go.uber.org/atomic
import path.