NIOAsyncSequenceProducer

This is an AsyncSequence that supports a unicast AsyncIterator.

NIOAsyncSequenceProducer.swift:96
iOS
13+
macOS
10.15+
tvOS
13+
watchOS
6+
struct NIOAsyncSequenceProducer<Element, Strategy, Delegate> where Element : Sendable, Strategy : NIOAsyncSequenceProducerBackPressureStrategy, Delegate : NIOAsyncSequenceProducerDelegate

The goal of this sequence is to produce a stream of elements from the synchronous world (e.g. elements from a Channel pipeline) and vend it to the asynchronous world for consumption. Furthermore, it provides facilities to implement a back-pressure strategy which observes the number of elements that are yielded and consumed. This allows to signal the source to request more data.