Structureswift-nio 2.81.0NIOCore
HighLowWatermark
A high-low watermarked back-pressure strategy for a NIOAsyncSequenceProducer
.
- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
struct HighLowWatermark
This strategy does the following:
On yield it keeps on demanding more elements from the producer as long as the number of buffered elements hasn’t reached the
highWatermark
.On consume it starts to demand again from the producer once the number of buffered elements reach the
lowWatermark
.