@@ -30,7 +30,7 @@ import Swift
30
30
/// calling it from concurrent contexts external to the iteration of the
31
31
/// `AsyncStream`.
32
32
///
33
- /// An arbitrary source of elements may produce elements faster than they are
33
+ /// An arbitrary source of elements can produce elements faster than they are
34
34
/// consumed by a caller iterating over them. Because of this, `AsyncStream`
35
35
/// defines a buffering behavior, allowing the stream to buffer a specific
36
36
/// number of oldest or newest elements. By default, the buffer limit is
@@ -119,6 +119,10 @@ public struct AsyncStream<Element> {
119
119
120
120
/// A type that indicates the result of yielding a value to a client, by
121
121
/// way of the continuation.
122
+ ///
123
+ /// The various `yield` methods of `AsyncStream.Continuation` return this
124
+ /// type to indicate the success or failure of yielding an element to the
125
+ /// continuation.
122
126
public enum YieldResult {
123
127
124
128
/// The stream successfully enqueued the element.
@@ -172,7 +176,7 @@ public struct AsyncStream<Element> {
172
176
/// - Returns: A `YieldResult` indicating the success or failure of the
173
177
/// yield operation.
174
178
///
175
- /// If nothing is awaiting the next value, this call attempts to buffer the
179
+ /// If nothing is awaiting the next value, this method attempts to buffer the
176
180
/// result's element.
177
181
///
178
182
/// This can be called more than once and returns to the caller immediately
@@ -363,7 +367,7 @@ extension AsyncStream.Continuation {
363
367
/// - Returns: A `YieldResult` indicating the success or failure of the
364
368
/// yield operation.
365
369
///
366
- /// If nothing is awaiting the next value, this call attempts to buffer the
370
+ /// If nothing is awaiting the next value, the method attempts to buffer the
367
371
/// result's element.
368
372
///
369
373
/// If you call this method repeatedly, each call returns immediately, without
0 commit comments