Commit Graph

2 Commits (fdfe5309acf1f8535d451db8fb55c8df485dc419)

Author SHA1 Message Date
James Tucker fdfe5309ac
util/latencyqueue: use util/ringbuffer for improved memory cost
Updates tailscale/corp#34129

Signed-off-by: James Tucker <james@tailscale.com>
3 weeks ago
James Tucker 55b4993256
util/latencyqueue: add a bounded-latency queue
Sometimes you do not know how many elements are resasonable, but you do
know how stale elements can be at maximum, for example when streaming
optimistic synchronization data. latencyqueue provides a primitive that
makes it easier to keep such an unbounded queue, but abort and drop the
queue if the consumer is not able to keep up with the desired bound.

Updates tailscale/corp#34129

Signed-off-by: James Tucker <james@tailscale.com>
4 weeks ago