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.
Swap and CompareAndSwap for Value wrappers without initialization.String method to atomic.Pointer[T] type allowing users to safely printunderlying values of pointers.
[1.11.0]: https://github.com/uber-go/atomic/compare/v1.10.0...v1.11.0
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.
[1.10.0]: https://github.com/uber-go/atomic/compare/v1.9.0...v1.10.0
Float64.Swap to match int atomic operations.atomic.Time type for atomic operations on time.Time values.[1.9.0]: https://github.com/uber-go/atomic/compare/v1.8.0...v1.9.0
atomic.Uintptr type for atomic operations on uintptr values.atomic.UnsafePointer type for atomic operations on unsafe.Pointer values.[1.8.0]: https://github.com/uber-go/atomic/compare/v1.7.0...v1.8.0
golang.org/x/{lint, tools}.[1.7.0]: https://github.com/uber-go/atomic/compare/v1.6.0...v1.7.0
golang.org/x/{lint, tools}.[1.6.0]: https://github.com/uber-go/atomic/compare/v1.5.1...v1.6.0
Bool.CAS and Bool.Toggle do work correctly together causing CAS to fail even though the old value matches.
[1.5.1]: https://github.com/uber-go/atomic/compare/v1.5.0...v1.5.1
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.
[1.5.0]: https://github.com/uber-go/atomic/compare/v1.4.0...v1.5.0
atomic.Error type for atomic operations on error values.[1.4.0]: https://github.com/uber-go/atomic/compare/v1.3.2...v1.4.0
atomic.Duration type for atomic operations on time.Duration values.[1.3.2]: https://github.com/uber-go/atomic/compare/v1.3.1...v1.3.2
atomic.String.Store("") which caused data races.[1.3.1]: https://github.com/uber-go/atomic/compare/v1.3.0...v1.3.1
atomic.Bool.CAS for compare-and-swap semantics on bools.atomic.String.Store("") by avoiding an allocation.[1.3.0]: https://github.com/uber-go/atomic/compare/v1.2.0...v1.3.0
atomic.Value from sync/atomic.[1.2.0]: https://github.com/uber-go/atomic/compare/v1.1.0...v1.2.0
Float64 type.go.uber.org/atomic import path.[1.1.0]: https://github.com/uber-go/atomic/compare/v1.0.0...v1.1.0
[1.0.0]: https://github.com/uber-go/atomic/releases/tag/v1.0.0