Skip to main content

Module ring

Module ring 

Source
Expand description

A bounded queue that drops its oldest entry, with a count, when full.

A slow reader can never grow server memory beyond capacity entries, and what it lost is a number it is told, never a silence: the evictions since the reader last took from the ring travel with what it takes.

Structsยง

BoundedRing
A bounded first-in first-out queue that evicts its oldest entry on a push into a full queue and counts every eviction.