Instance Methodswift-nio 2.72.0NIOCore
finish
Finishes the sequence.
NIOAsyncSequenceProducer.swift:337- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
func finish()
Calling this function signals the sequence that there won’t be any subsequent elements yielded.
If there are still buffered elements and there is an AsyncIterator
consuming the sequence, then termination of the sequence only happens once all elements have been consumed by the AsyncIterator
. Otherwise, the buffered elements will be dropped.
Other members in extension
Types
enum YieldResult
The result of a call to
yield(_:)
.
Instance members
func yield(Element
) -> YieldResult Yields a new elements to the
NIOAsyncSequenceProducer
.func yield<S>(contentsOf: S
) -> YieldResult Yields a sequence of new elements to the
NIOAsyncSequenceProducer
.