I just noticed a discrepancy in the AsyncStream APIs:
AsyncStreamhas aninit(unfolding:onCancel:)initializer- The
onCancelparameter is optional because it has a default argument= nil.
- The
AsyncThrowingStreamonly hasinit(unfolding:)without theonCancelparameter.
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?