tailscale/syncs
Joe Tsai ff5b4bae99
syncs: add MutexValue (#14422)
MutexValue is simply a value guarded by a mutex.
For any type that is not pointer-sized,
MutexValue will perform much better than AtomicValue
since it will not incur an allocation boxing the value
into an interface value (which is how Go's atomic.Value
is implemented under-the-hood).

Updates #cleanup

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
2024-12-18 17:11:22 -08:00
..
locked_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
locked.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
pool_test.go syncs: add generic Pool (#12759) 2024-07-10 09:39:52 -07:00
pool.go syncs: add generic Pool (#12759) 2024-07-10 09:39:52 -07:00
shardedmap_test.go syncs: add ShardedMap.Mutate 2023-06-28 08:43:15 -07:00
shardedmap.go syncs: add ShardedMap.Mutate 2023-06-28 08:43:15 -07:00
syncs_test.go syncs: add MutexValue (#14422) 2024-12-18 17:11:22 -08:00
syncs.go syncs: add MutexValue (#14422) 2024-12-18 17:11:22 -08:00