Skip to content

Commit 6b62146

Browse files
author
Chris Adamson
committed
Add AsyncStream.Continuation escaping note.
1 parent 3ed8f9f commit 6b62146

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

stdlib/public/Concurrency/AsyncStream.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ public struct AsyncStream<Element> {
103103
/// invoked. Use this continuation to provide elements to the stream by
104104
/// calling one of the `yield` methods, then terminate the stream normally by
105105
/// calling the `finish()` method.
106+
///
107+
/// - Note: Unlike other continuations in Swift, `AsyncStream.Continuation`
108+
/// supports escaping.
106109
public struct Continuation: Sendable {
107110
/// A type that indicates how the stream terminated.
108111
///

stdlib/public/Concurrency/AsyncThrowingStream.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ public struct AsyncThrowingStream<Element, Failure: Error> {
124124
/// calling one of the `yield` methods, then terminate the stream normally by
125125
/// calling the `finish()` method. You can also use the continuation's
126126
/// `finish(throwing:)` method to terminate the stream by throwing an error.
127+
///
128+
/// - Note: Unlike other continuations in Swift,
129+
/// `AsyncThrowingStream.Continuation` supports escaping.
127130
public struct Continuation: Sendable {
128131
/// A type that indicates how the stream terminated.
129132
///

0 commit comments

Comments
 (0)