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 674beabc73
syncs: add Map.LoadFunc (#9869)
The LoadFunc loads a value and calls a user-provided function.
The utility of this method is to ensure that the map lock is held
while executing user-provided logic.
This allows us to solve TOCTOU bugs that would be nearly imposible
to the solve without this API.

Updates tailscale/corp#14772

Signed-off-by: Joe Tsai <joetsai@digital-static.net>
8 months ago
..
locked.go all: update copyright and license headers 1 year ago
locked_test.go all: update copyright and license headers 1 year ago
shardedmap.go syncs: add ShardedMap.Mutate 11 months ago
shardedmap_test.go syncs: add ShardedMap.Mutate 11 months ago
syncs.go syncs: add Map.LoadFunc (#9869) 8 months ago
syncs_test.go syncs: add Map.LoadFunc (#9869) 8 months ago
watchdog.go all: update copyright and license headers 1 year ago
watchdog_test.go syncs: relax TestWatchMultipleValues timing on Windows 1 year ago