@@ -15,7 +15,7 @@ import Swift
1515/// An ordered, asynchronously generated sequence of elements.
1616///
1717/// AsyncStream is an interface type to adapt from code producing values to an
18- /// asynchronous context iterating them. This is itended to be used to allow
18+ /// asynchronous context iterating them. This is intended to be used to allow
1919/// callback or delegation based APIs to participate with async/await.
2020///
2121/// When values are produced from a non async/await source there is a
@@ -57,13 +57,13 @@ public struct AsyncStream<Element> {
5757 let storage : _Storage
5858
5959 /// Resume the task awaiting the next iteration point by having it return
60- /// nomally from its suspension point or buffer the value if no awaiting
60+ /// normally from its suspension point or buffer the value if no awaiting
6161 /// next iteration is active.
6262 ///
6363 /// - Parameter value: The value to yield from the continuation.
6464 ///
6565 /// This can be called more than once and returns to the caller immediately
66- /// without blocking for any awaiting consuption from the iteration.
66+ /// without blocking for any awaiting consumption from the iteration.
6767 public func yield( _ value: __owned Element) {
6868 storage. yield ( value)
6969 }
@@ -86,7 +86,7 @@ public struct AsyncStream<Element> {
8686 /// is disposed of after any terminal state is reached.
8787 ///
8888 /// Cancelling an active iteration will first invoke the onTermination callback
89- /// and then resume yeilding nil. This means that any cleanup state can be
89+ /// and then resume yielding nil. This means that any cleanup state can be
9090 /// emitted accordingly in the cancellation handler
9191 public var onTermination : ( @Sendable ( Termination ) -> Void ) ? {
9292 get {
@@ -108,7 +108,7 @@ public struct AsyncStream<Element> {
108108 /// - Parameter build: The work associated with yielding values to the AsyncStream.
109109 ///
110110 /// The maximum number of pending elements limited by dropping the oldest
111- /// value when a new value comes in if the buffer would excede the limit
111+ /// value when a new value comes in if the buffer would exceed the limit
112112 /// placed upon it. By default this limit is unlimited.
113113 ///
114114 /// The build closure passes in a Continuation which can be used in
@@ -130,7 +130,7 @@ public struct AsyncStream<Element> {
130130extension AsyncStream : AsyncSequence {
131131 /// The asynchronous iterator for iterating a AsyncStream.
132132 ///
133- /// This type is specificially not Sendable. It is not intended to be used
133+ /// This type is specifically not Sendable. It is not intended to be used
134134 /// from multiple concurrent contexts. Any such case that next is invoked
135135 /// concurrently and contends with another call to next is a programmer error
136136 /// and will fatalError.
@@ -145,7 +145,7 @@ extension AsyncStream: AsyncSequence {
145145 ///
146146 /// If the task this iterator is running in is canceled while next is
147147 /// awaiting a value, this will terminate the AsyncStream and next may return nil
148- /// immediately (or will return nil on subseuqent calls)
148+ /// immediately (or will return nil on subsequent calls)
149149 public mutating func next( ) async -> Element ? {
150150 await produce ( )
151151 }
@@ -166,7 +166,7 @@ extension AsyncStream.Continuation {
166166 /// - Parameter result: A result to yield from the continuation.
167167 ///
168168 /// This can be called more than once and returns to the caller immediately
169- /// without blocking for any awaiting consuption from the iteration.
169+ /// without blocking for any awaiting consumption from the iteration.
170170 public func yield(
171171 with result: Result < Element , Never >
172172 ) {
@@ -181,7 +181,7 @@ extension AsyncStream.Continuation {
181181 /// next iteration is active where the `Element` is `Void`.
182182 ///
183183 /// This can be called more than once and returns to the caller immediately
184- /// without blocking for any awaiting consuption from the iteration.
184+ /// without blocking for any awaiting consumption from the iteration.
185185 public func yield( ) where Element == Void {
186186 storage. yield ( ( ) )
187187 }
0 commit comments