22
33* Proposal: [ SAA-0016] ( 0016-multi-producer-single-consumer-channel.md )
44* Authors: [ Franz Busch] ( https://github.com/FranzBusch )
5- * Review Manager: TBD
65* Status: ** Implemented**
76
87## Revision
9- - 2025/03/24: Adopt ` ~Copyable ` for better performance.
8+ - 2025/03/24: Adopt ` ~Copyable ` for correct semantics and better performance.
109- 2023/12/18: Migrate proposal from Swift Evolution to Swift Async Algorithms.
1110- 2023/12/19: Add element size dependent strategy
1211- 2024/05/19: Rename to multi producer single consumer channel
@@ -25,8 +24,8 @@ with the goal to model asynchronous multi-producer-single-consumer systems.
2524After using the ` AsyncSequence ` protocol, the ` Async[Throwing]Stream ` types, and
2625the ` Async[Throwing]Channel ` types extensively over the past years, we learned
2726that there is a gap in the ecosystem for a type that provides strict
28- multi-producer-single-consumer guarantees with backpressure support.
29- Additionally, any type stream/channel like type needs to have a clear definition
27+ multi-producer-single-consumer guarantees with external backpressure support.
28+ Additionally, any stream/channel like type needs to have a clear definition
3029about the following behaviors:
3130
32311 . Backpressure
@@ -138,9 +137,9 @@ protocols are not supporting `~Copyable` types we provide a way to convert the
138137proposed channel to an asynchronous sequence. This leaves us room to support any
139138potential future asynchronous streaming protocol that supports ` ~Copyable ` .
140139
141- ### Creating an MultiProducerSingleConsumerChannel
140+ ### Creating a MultiProducerSingleConsumerChannel
142141
143- You can create an ` MultiProducerSingleConsumerChannel ` instance using the new
142+ You can create an ` MultiProducerSingleConsumerChannel ` instance using the
144143` makeChannel(of: backpressureStrategy:) ` method. This method returns you the
145144channel and the source. The source can be used to send new values to the
146145asynchronous channel. The new API specifically provides a
@@ -839,7 +838,7 @@ To achieve maximum performance the implementation is using `~Copyable` extensive
839838On Swift versions before 6.1, there is a https://github.com/swiftlang/swift/issues/78048 when using; hence, this type
840839is only usable with Swift 6.1 and later compilers.
841840
842- ## Acknowledgements
841+ ## Acknowledgements
843842
844843- [ Johannes Weiss] ( https://github.com/weissi ) - For making me aware how
845844important this problem is and providing great ideas on how to shape the API.
0 commit comments