Skip to content

Add new experimental _AsyncStreaming module#400

Merged
FranzBusch merged 1 commit into
apple:mainfrom
FranzBusch:fb-async-streaming-base
May 11, 2026
Merged

Add new experimental _AsyncStreaming module#400
FranzBusch merged 1 commit into
apple:mainfrom
FranzBusch:fb-async-streaming-base

Conversation

@FranzBusch
Copy link
Copy Markdown
Member

This PR adds an experimental module for asynchronous streaming interfaces as a potential evolution to async sequence. These APIs are considered highly unstable and are mostly for experimentation purposes; hence, they are part of an underscored module and all APIs are hidden behind a trait. I expect significant changes to those APIs to offer more functionality such as gather scatter and more.

@FranzBusch FranzBusch force-pushed the fb-async-streaming-base branch from 414c3e5 to f06696a Compare February 13, 2026 16:44
Copy link
Copy Markdown
Member

@Catfish-Man Catfish-Man left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this up :)

Comment thread Sources/_AsyncStreaming/Reader/Array+AsyncReader.swift Outdated
Comment thread Sources/_AsyncStreaming/Reader/AsyncReader+forEach.swift Outdated
Comment thread Sources/_AsyncStreaming/Reader/AsyncReader+map.swift Outdated
Comment thread Sources/_AsyncStreaming/Reader/AsyncReader.swift Outdated
Comment thread Sources/_AsyncStreaming/Writer/AsyncWriter+AsyncReader.swift Outdated
Comment thread Sources/_AsyncStreaming/Writer/AsyncWriter.swift Outdated
Comment thread Sources/_AsyncStreaming/Writer/AsyncWriter.swift Outdated
Copy link
Copy Markdown

@czechboy0 czechboy0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool 🙏

Comment thread Sources/_AsyncStreaming/Writer/AsyncWriter.swift Outdated
Comment thread Sources/_AsyncStreaming/Writer/AsyncWriter.swift Outdated
Comment thread Sources/_AsyncStreaming/Writer/AsyncWriter.swift Outdated
@FranzBusch FranzBusch force-pushed the fb-async-streaming-base branch from f06696a to b8afe7c Compare March 27, 2026 12:31
@FranzBusch FranzBusch force-pushed the fb-async-streaming-base branch 2 times, most recently from 7bafde6 to 9fd2f61 Compare April 29, 2026 11:13
Copy link
Copy Markdown
Member

@Catfish-Man Catfish-Man left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General note: it looks like we could use test coverage for two of the protocol types. Want me to whip up a diff for that?

Comment thread Sources/AsyncStreaming/AsyncReader/AsyncReader.swift
Comment thread Sources/AsyncStreaming/AsyncReader/AsyncReader.swift
Comment thread Sources/_AsyncStreaming/AsyncReader/AsyncReader.swift
Comment thread Sources/AsyncStreaming/AsyncWriter/AsyncWriter.swift
Comment thread Sources/AsyncStreaming/CallerAsyncWriter/CallerAsyncWriter.swift
Comment thread Sources/AsyncStreaming/EitherError.swift
Comment thread Sources/_AsyncStreaming/AsyncWriter/AsyncWriter.swift Outdated
Comment thread Tests/AsyncStreamingTests/Helpers/Array+Span.swift
@FranzBusch FranzBusch force-pushed the fb-async-streaming-base branch 2 times, most recently from 6747d76 to 118c682 Compare April 30, 2026 12:46
@FranzBusch
Copy link
Copy Markdown
Member Author

General note: it looks like we could use test coverage for two of the protocol types. Want me to whip up a diff for that?

That was intentional since the two remaining tests require OutputSpans in async contexts which we currently don't have a solution for.

@Catfish-Man Catfish-Man self-requested a review April 30, 2026 23:18
@FranzBusch FranzBusch force-pushed the fb-async-streaming-base branch 2 times, most recently from ff37a29 to 9625d96 Compare May 11, 2026 12:42
This PR adds an experimental module for asynchronous streaming interfaces as a potential evolution to async sequence. These APIs are considered highly unstable and are mostly for experimentation purposes; hence, they are part of an underscored module and all APIs are hidden behind a trait. I expect significant changes to those APIs to offer more functionality such as gather scatter and more.
@FranzBusch FranzBusch force-pushed the fb-async-streaming-base branch from 9625d96 to 1f54395 Compare May 11, 2026 12:46
@FranzBusch FranzBusch merged commit be2467e into apple:main May 11, 2026
30 of 31 checks passed
@FranzBusch
Copy link
Copy Markdown
Member Author

I merged over the docs failure which should be fixed by apple/swift-collections#649

@FranzBusch FranzBusch deleted the fb-async-streaming-base branch May 11, 2026 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants