diff options
| author | Andrew Dunham <andrew@du.nham.ca> | 2024-05-03 18:20:44 -0700 |
|---|---|---|
| committer | Andrew Dunham <andrew@du.nham.ca> | 2024-06-10 18:38:27 -0400 |
| commit | 93cd2ab224d2c51c94769baa386a571fb3c86c08 (patch) | |
| tree | 9d43072b3a66788e9f14118fffe3173be7c3cd1b /control/controlknobs/controlknobs.go | |
| parent | bc53ebd4a077e91de303f470d8dcb0169f0625cf (diff) | |
| download | tailscale-93cd2ab224d2c51c94769baa386a571fb3c86c08.tar.xz tailscale-93cd2ab224d2c51c94769baa386a571fb3c86c08.zip | |
util/singleflight: add DoChanContext
This is a variant of DoChan that supports context propagation, such that
the context provided to the inner function will only be canceled when
there are no more waiters for a given key. This can be used to
deduplicate expensive and cancelable calls among multiple callers
safely.
Updates #11935
Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: Ibe1fb67442a854babbc6924fd8437b02cc9e7bcf
Diffstat (limited to 'control/controlknobs/controlknobs.go')
0 files changed, 0 insertions, 0 deletions
