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.
- Add
MarshalJSON
andUnmarshalJSON
method toatomic.Pointer[T]
type allowing users to use pointer with json.
1.11.0 - 2023-05-02
- Fix
Swap
andCompareAndSwap
forValue
wrappers without initialization.
- Add
String
method toatomic.Pointer[T]
type allowing users to safely print underlying values of pointers.
1.10.0 - 2022-08-11
- Add
atomic.Float32
type for atomic operations onfloat32
. - Add
CompareAndSwap
andSwap
methods toatomic.String
,atomic.Error
, andatomic.Value
. - Add generic
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'ssync/atomic.Pointer
type.
- Deprecate
CAS
methods on all types in favor of correspondingCompareAndSwap
methods.
Thanks to @eNV25 and @icpd for their contributions to this release.
1.9.0 - 2021-07-15
- Add
Float64.Swap
to match int atomic operations. - Add
atomic.Time
type for atomic operations ontime.Time
values.
1.8.0 - 2021-06-09
- Add
atomic.Uintptr
type for atomic operations onuintptr
values. - Add
atomic.UnsafePointer
type for atomic operations onunsafe.Pointer
values.
1.7.0 - 2020-09-14
- Support JSON serialization and deserialization of primitive atomic types.
- Support Text marshalling and unmarshalling for string atomics.
- Disallow incorrect comparison of atomic values in a non-atomic way.
- Remove dependency on
golang.org/x/{lint, tools}
.
1.6.0 - 2020-02-24
- Drop library dependency on
golang.org/x/{lint, tools}
.
1.5.1 - 2019-11-19
- Fix bug where
Bool.CAS
andBool.Toggle
do work correctly together causingCAS
to fail even though the old value matches.
1.5.0 - 2019-10-29
- With Go modules, only the
go.uber.org/atomic
import path is supported now. If you need to use the old import path, please add areplace
directive to yourgo.mod
.
1.4.0 - 2019-05-01
- Add
atomic.Error
type for atomic operations onerror
values.
1.3.2 - 2018-05-02
- Add
atomic.Duration
type for atomic operations ontime.Duration
values.
1.3.1 - 2017-11-14
- Revert optimization for
atomic.String.Store("")
which caused data races.
1.3.0 - 2017-11-13
- Add
atomic.Bool.CAS
for compare-and-swap semantics on bools.
- Optimize
atomic.String.Store("")
by avoiding an allocation.
1.2.0 - 2017-04-12
- Shadow
atomic.Value
fromsync/atomic
.
1.1.0 - 2017-03-10
- Add atomic
Float64
type.
- Support new
go.uber.org/atomic
import path.
1.0.0 - 2016-07-18
- Initial release.