Joe Tsai 84aa7ff3bb
syncs: fix AtomicValue.CompareAndSwap (#16137)
Fix CompareAndSwap in the edge-case where
the underlying sync.AtomicValue is uninitialized
(i.e., Store was never called) and
the oldV is the zero value,
then perform CompareAndSwap with any(nil).

Also, document that T must be comparable.
This is a pre-existing restriction.

Fixes #16135

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2025-05-30 11:06:16 -07:00
..
2024-07-10 09:39:52 -07:00
2024-07-10 09:39:52 -07:00
2023-06-28 08:43:15 -07:00