Skip to content

Commit 83624ef

Browse files
author
Chris Adamson
committed
Address more of @amartini51's doc feedback.
1 parent 4d8efaa commit 83624ef

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

stdlib/public/Concurrency/AsyncStream.swift

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Swift
3030
/// calling it from concurrent contexts external to the iteration of the
3131
/// `AsyncStream`.
3232
///
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
3434
/// consumed by a caller iterating over them. Because of this, `AsyncStream`
3535
/// defines a buffering behavior, allowing the stream to buffer a specific
3636
/// number of oldest or newest elements. By default, the buffer limit is
@@ -119,6 +119,10 @@ public struct AsyncStream<Element> {
119119

120120
/// A type that indicates the result of yielding a value to a client, by
121121
/// 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.
122126
public enum YieldResult {
123127

124128
/// The stream successfully enqueued the element.
@@ -172,7 +176,7 @@ public struct AsyncStream<Element> {
172176
/// - Returns: A `YieldResult` indicating the success or failure of the
173177
/// yield operation.
174178
///
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
176180
/// result's element.
177181
///
178182
/// This can be called more than once and returns to the caller immediately
@@ -363,7 +367,7 @@ extension AsyncStream.Continuation {
363367
/// - Returns: A `YieldResult` indicating the success or failure of the
364368
/// yield operation.
365369
///
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
367371
/// result's element.
368372
///
369373
/// If you call this method repeatedly, each call returns immediately, without

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import Swift
3535
/// permits calling it from concurrent contexts external to
3636
/// the iteration of the `AsyncThrowingStream`.
3737
///
38-
/// An arbitrary source of elements may produce elements faster than they are
38+
/// An arbitrary source of elements can produce elements faster than they are
3939
/// consumed by a caller iterating over them. Because of this, `AsyncThrowingStream`
4040
/// defines a buffering behavior, allowing the stream to buffer a specific
4141
/// number of oldest or newest elements. By default, the buffer limit is
@@ -143,6 +143,10 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
143143

144144
/// A type that indicates the result of yielding a value to a client, by
145145
/// way of the continuation.
146+
///
147+
/// The various `yield` methods of `AsyncThrowingStream.Continuation` return
148+
/// this type to indicate the success or failure of yielding an element to
149+
/// the continuation.
146150
public enum YieldResult {
147151

148152
/// The stream successfully enqueued the element.
@@ -198,7 +202,7 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
198202
/// - Returns: A `YieldResult` indicating the success or failure of the
199203
/// yield operation.
200204
///
201-
/// If nothing is awaiting the next value, this call attempts to buffer the
205+
/// If nothing is awaiting the next value, the method attempts to buffer the
202206
/// result's element.
203207
///
204208
/// This can be called more than once and returns to the caller immediately

0 commit comments

Comments
 (0)