You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/syncs
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>
6 months ago
..
locked.go all: update copyright and license headers 3 years ago
locked_test.go all: update copyright and license headers 3 years ago
pool.go syncs: add generic Pool (#12759) 1 year ago
pool_test.go syncs: add generic Pool (#12759) 1 year ago
shardedint.go syncs: add ShardedInt expvar.Var type 12 months ago
shardedint_test.go syncs: add ShardedInt expvar.Var type 12 months ago
shardedmap.go syncs: add ShardedMap.Mutate 2 years ago
shardedmap_test.go syncs: add ShardedMap.Mutate 2 years ago
shardvalue.go syncs: add ShardedInt expvar.Var type 12 months ago
shardvalue_go.go syncs: add ShardedInt expvar.Var type 12 months ago
shardvalue_tailscale.go syncs: add ShardedInt expvar.Var type 12 months ago
shardvalue_test.go syncs: add ShardedInt expvar.Var type 12 months ago
syncs.go syncs: fix AtomicValue.CompareAndSwap (#16137) 6 months ago
syncs_test.go syncs: fix AtomicValue.CompareAndSwap (#16137) 6 months ago