Skip to content

AsyncThrowingStream.init(unfolding:) has no onCancel parameter #77974

Open
@ole

Description

@ole

Description

There's a discrepancy in the AsyncStream APIs:

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.

Forum discussion: https://forums.swift.org/t/asyncthrowingstream-init-unfolding-has-no-oncancel-parameter/76386

Reproduction

n/a

Expected behavior

n/a

Environment

Swift 6.0. I checked the API docs at https://developer.apple.com/documentation/swift/asyncthrowingstream/ on 2024-12-05.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    ConcurrencуArea → standard library: The `Concurrency` module under the standard library umbrellabugA deviation from expected or documented behavior. Also: expected but undesirable behavior.concurrencyFeature: umbrella label for concurrency language featuresstandard libraryArea: Standard library umbrella

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions