Commit Graph

2 Commits

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>
2025-11-09 23:29:15 -08:00
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>
2025-11-07 19:53:35 -08:00