mirror of
https://github.com/apple/swift-async-algorithms
synced 2026-11-28 04:54:20 +00:00
Add MultiProducerSingleConsumerChannel (#305)
* Add `AsyncBackpressuredStream` proposal and implementation # Motivation The pitch to add external backpressure support to the standard libraries `AsyncStream` got returned for revision since there are larger open questions around `AsyncSequence`. However, having external backpressure in a source asynchronous sequence is becoming more and more important. # Modification This PR adds a modified proposal and implementation that brings the Swift Evolution proposal over to Swift Async Algorithms. * Update proposal and implementation * Update proposal * Add example project * Formatting * Fix Swift 6.0 build * Future direction for ~Copyable elements * Apply formatting * Fix CI * Move to 6.1 and update proposal * Guard tests * Minor edits to the proposal * Fix revision order * FIxup setOnTerminationCallback * Address review feedback * Rename to `MultiProducerSingleConsumerAsyncChannel` * Allow one termination callback per source. * Fix all sendable warnings * Remove unbounded strategy, rename copy -> makeAdditionalSource, rename asyncSequence() -> elements(), and move enqueue and cancel to the `CallbackHandle` previously called `CallbackToken` * Remove Example and fix docs and fix format * fixes grammar and some word order issues * Remove unnecessary consume --------- Co-authored-by: Joe Heck <j_heck@apple.com>
This commit is contained in:
1 parent
24bd5acc81
commit
4686d2edd3
8 files changed
+4718
No files matched your search
@@ -22,3 +22,4 @@ jobs:
|
||||
uses: swiftlang/github-workflows/.github/workflows/soundness.yml@main
|
||||
with:
|
||||
license_header_check_project_name: "Swift Async Algorithms"
|
||||
format_check_container_image: "swiftlang/swift:nightly-6.1-noble" # Needed since 6.0.x doesn't support sending keyword
|
||||
Reference in new issue
Block a user