I just noticed a discrepancy in the AsyncStream
APIs:
AsyncStream
has aninit(unfolding:onCancel:)
initializer- The
onCancel
parameter is optional because it has a default argument= nil
.
- The
AsyncThrowingStream
only hasinit(unfolding:)
without theonCancel
parameter.
The proposal SE-0314: AsyncStream and AsyncThrowingStream proposes the init(unfolding:onCancel:)
variant for both stream types, so not having it on AsyncThrowingStream
looks like an oversight?