Skip to content

Commit 717d5c6

Browse files
Incorporate spelling & wording fixes from editorial review.
Co-authored-by: Chuck Toporek <[email protected]>
1 parent b1d2e24 commit 717d5c6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

stdlib/public/Concurrency/AsyncStream.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public struct AsyncStream<Element> {
131131

132132
/// The stream successfully enqueued the element.
133133
///
134-
/// This value reprsents the successful enqueueing of an element, whether
134+
/// This value represents the successful enqueueing of an element, whether
135135
/// the stream buffers the element or delivers it immediately to a pending
136136
/// call to `next()`. The associated value `remaining` is a hint that
137137
/// indicates the number of remaining slots in the buffer at the time of
@@ -208,7 +208,7 @@ public struct AsyncStream<Element> {
208208
/// stream.
209209
///
210210
/// If an `onTermination` callback is set, using task cancellation to
211-
/// terminate iteration of a `AsyncStream` results in a call to this
211+
/// terminate iteration of an `AsyncStream` results in a call to this
212212
/// callback.
213213
///
214214
/// Canceling an active iteration invokes the `onTermination` callback
@@ -238,7 +238,7 @@ public struct AsyncStream<Element> {
238238
/// unlimited number of elements. You can also set the policy to buffer a
239239
/// specified number of oldest or newest elements.
240240
/// - build: A custom closure that yields values to the
241-
/// `AsyncStream`. This closure receives a `AsyncStream.Continuation`
241+
/// `AsyncStream`. This closure receives an `AsyncStream.Continuation`
242242
/// instance that it uses to provide elements to the stream and terminate the
243243
/// stream when finished.
244244
///
@@ -286,14 +286,14 @@ public struct AsyncStream<Element> {
286286
/// - Parameters:
287287
/// - produce: A closure that asynchronously produces elements for the
288288
/// stream.
289-
/// - onCancel: A closure to execute when cancelling the stream's task.
289+
/// - onCancel: A closure to execute when canceling the stream's task.
290290
///
291291
/// Use this convenience initializer when you have an asychronous function
292292
/// that can produce elements for the stream, and don't want to invoke
293293
/// a continuation manually. This initializer "unfolds" your closure into
294294
/// an asynchronous stream. The created stream handles conformance
295295
/// to the `AsyncSequence` protocol automatically, including termination
296-
/// (whether by cancellation or by returning `nil` from the closure to finish
296+
/// (either by cancellation or by returning `nil` from the closure to finish
297297
/// iteration).
298298
///
299299
/// The following example shows an `AsyncStream` created with this

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,13 +154,13 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
154154

155155
/// The stream successfully enqueued the element.
156156
///
157-
/// This value reprsents the successful enqueueing of an element, whether
157+
/// This value represents the successful enqueueing of an element, whether
158158
/// the stream buffers the element or delivers it immediately to a pending
159159
/// call to `next()`. The associated value `remaining` is a hint that
160160
/// indicates the number of remaining slots in the buffer at the time of
161161
/// the `yield` call.
162162
///
163-
/// - Note: From a thread safety viewpoint, `remaining` is a lower bound
163+
/// - Note: From a thread safety perspective, `remaining` is a lower bound
164164
/// on the number of remaining slots. This is because a subsequent call
165165
/// that uses the `remaining` value could race on the consumption of
166166
/// values from the stream.
@@ -233,7 +233,7 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
233233
/// stream.
234234
///
235235
/// If an `onTermination` callback is set, using task cancellation to
236-
/// terminate iteration of a `AsyncThrowingStream` results in a call to this
236+
/// terminate iteration of an `AsyncThrowingStream` results in a call to this
237237
/// callback.
238238
///
239239
/// Canceling an active iteration invokes the `onTermination` callback

0 commit comments

Comments
 (0)