Skip to content

Commit 3e3538b

Browse files
author
Chris Adamson
committed
Correct note syntax for AsyncStream doc comments.
1 parent ba14cf6 commit 3e3538b

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

stdlib/public/Concurrency/AsyncStream.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public struct AsyncStream<Element> {
133133
/// indicates the number of remaining slots in the buffer at the time of
134134
/// the `yield` call.
135135
///
136-
/// > Note: From a thread safety viewpoint, `remaining` is a lower bound
136+
/// - Note: From a thread safety viewpoint, `remaining` is a lower bound
137137
/// on the number of remaining slots. This is because a subsequent call
138138
/// that uses the `remaining` value could race on the consumption of
139139
/// values from the stream.

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,14 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
153153
///
154154
/// This value reprsents the successful enqueueing of an element, whether
155155
/// the stream buffers the element or delivers it immediately to a pending
156-
/// call to `next()`. The associated value `remaining` indicates the
157-
/// number of remaining slots in the buffer at the point in time of
158-
/// yielding.
156+
/// call to `next()`. The associated value `remaining` is a hint that
157+
/// indicates the number of remaining slots in the buffer at the time of
158+
/// the `yield` call.
159159
///
160-
/// > Note: Acting on the remaining count is valid only when calls to
161-
/// yield are mutually exclusive.
160+
/// - Note: From a thread safety viewpoint, `remaining` is a lower bound
161+
/// on the number of remaining slots. This is because a subsequent call
162+
/// that uses the `remaining` value could race on the consumption of
163+
/// values from the stream.
162164
case enqueued(remaining: Int)
163165

164166
/// The stream didn't enqueue the element due to a full buffer.

0 commit comments

Comments
 (0)