prefetch

Function prefetch 

Source
pub fn prefetch<O>(s: RS2Stream<O>, prefetch_count: usize) -> RS2Stream<O>
where O: Send + 'static,
Expand description

Prefetch a specified number of elements ahead of consumption This combinator eagerly evaluates a specified number of elements ahead of what’s been requested, storing them in a buffer. This can improve performance by starting to process the next elements before they’re actually needed.

Backpressure is maintained by using a bounded channel with capacity equal to the prefetch count.