-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
Since the go1.19 update, there are lots of duplicate functionality between this package and sync/atomic. This duplication is currently needed because go1.18 is still supported.
sync/atomic has the following types that are duplicated here:
BoolInt32Int64Pointer[T]Uint32Uint64Uintptr
All types in sync/atomic have the following methods:
CompareAndSwapLoadStoreSwap
Integer-like types have the following, in addition to the above:
Add
But there is still some functionality in here go.uber.org/atomic that is not there in sync/atomic.
All thing considered, after go1.18 becomes unsupported, we could do the following:
- Update
gen-atomicintto embedsync/atomictypes. Only the following additional methods
need to be kept.
-CAS(Deprecated)
-Dec
-Inc
-Sub
-String
-MarshallJSON
-UnmarshallJSON - Update
Boolto embedsync/atomictype. Only the following additional methods
need to be kept.
-CAS(Deprecated)
-String
-Toggle
-MarshallJSON
-UnmarshallJSON - Update
Pointer[T]to embedsync/atomictype.
I just wanted to document all this stuff before I forget.
Metadata
Metadata
Assignees
Labels
No labels