Skip to content

Releases: uber-go/atomic

v1.11.0

03 May 21:29
Compare
Choose a tag to compare

Fixed

  • Fix Swap and CompareAndSwap for Value wrappers without initialization.

Added

  • Add String method to atomic.Pointer[T] type allowing users to safely print
    underlying values of pointers.

v1.10.0

11 Aug 23:32
9680036
Compare
Choose a tag to compare

Added

  • Add atomic.Float32 type for atomic operations on float32.
  • Add CompareAndSwap and Swap methods to atomic.String, atomic.Error,
    and atomic.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's sync/atomic.Pointer type.

Changed

  • Deprecate CAS methods on all types in favor of corresponding
    CompareAndSwap methods.

Thanks to @eNV25 and @icpd for their contributions to this release.

v1.9.0

15 Jul 17:19
3504dfa
Compare
Choose a tag to compare

Added

  • Add Float64.Swap to match int atomic operations.
  • Add atomic.Time type for atomic operations on time.Time values.

v1.8.0

09 Jun 16:15
0c8e1ec
Compare
Choose a tag to compare

Added

  • Add atomic.Uintptr type for atomic operations on uintptr values.
  • Add atomic.UnsafePointer type for atomic operations on unsafe.Pointer values.

v1.7.0

14 Sep 16:06
12f27ba
Compare
Choose a tag to compare

Added

  • Support JSON serialization and deserialization of primitive atomic types.
  • Support Text marshalling and unmarshalling for string atomics.

Changed

  • Disallow incorrect comparison of atomic values in a non-atomic way.

Removed

  • Remove dependency on golang.org/x/{lint, tools}.

v1.6.0

24 Feb 21:57
8459200
Compare
Choose a tag to compare
  • Drop library dependency on golang.org/x/{lint, tools}.

v1.5.1

19 Nov 21:34
40ae6a4
Compare
Choose a tag to compare
  • Fix bug where Bool.CAS and Bool.Toggle do work correctly together
    causing CAS to fail even though the old value matches.

v1.5.0

29 Oct 22:13
9dc4df0
Compare
Choose a tag to compare

Changed

  • 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 a replace directive to
    your go.mod.

v1.4.0

01 May 23:20
df976f2
Compare
Choose a tag to compare
  • Add atomic.Error type for atomic operations on error values.

v1.3.2

02 May 21:48
1ea20fb
Compare
Choose a tag to compare
  • Add atomic.Duration type for atomic operations on time.Duration values.