Construct a AsyncThrowingStream buffering given an Element type.
The maximum number of pending elements limited by dropping the oldest value when a new value comes in if the buffer would excede the limit placed upon it. By default this limit is unlimited.
The build closure passes in a Continuation which can be used in concurrent contexts. It is thread safe to send and finish; all calls are to the continuation are serialized, however calling this from multiple concurrent contexts could result in out of order delivery.
public init( _ elementType: Element.Type = Element.self, bufferingPolicy limit: AsyncThrowingStream<Element, Failure>.Continuation.BufferingPolicy = .unbounded, _ build: @escaping (AsyncThrowingStream<Element, Failure>.Continuation) async -> Void ) where Failure == Error
The type the AsyncThrowingStream will produce.
The maximum number of elements to hold in the buffer past any checks for continuations being resumed.
The work associated with yielding values to the AsyncThrowingStream.