Skip to content

Commit 915547b

Browse files
committed
The closure isn't the only place the continuation can be called.
Per tech review from @jckarter
1 parent d101b39 commit 915547b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

stdlib/public/Concurrency/CheckedContinuation.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ extension CheckedContinuation {
260260
/// source for the continuation, used to identify the continuation in
261261
/// runtime diagnostics related to misuse of this continuation.
262262
/// - body: A closure that takes an `UnsafeContinuation` parameter.
263-
/// The closure must resume the continuation exactly once.
263+
/// You must resume the continuation exactly once.
264264
@available(SwiftStdlib 5.5, *)
265265
public func withCheckedContinuation<T>(
266266
function: String = #function,
@@ -279,7 +279,7 @@ public func withCheckedContinuation<T>(
279279
/// source for the continuation, used to identify the continuation in
280280
/// runtime diagnostics related to misuse of this continuation.
281281
/// - body: A closure that takes an `UnsafeContinuation` parameter.
282-
/// The closure must resume the continuation exactly once.
282+
/// You must resume the continuation exactly once.
283283
///
284284
/// If `resume(throwing:)` is called on the continuation,
285285
/// this method thows that error.

stdlib/public/Concurrency/PartialAsyncTask.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ internal func _resumeUnsafeThrowingContinuationWithError<T>(
239239
/// then calls the given closure with the an unsafe continuation for the current task.
240240
///
241241
/// - Parameter fn: A closure that takes an `UnsafeContinuation` parameter.
242-
/// The closure must resume the continuation exactly once.
242+
/// You must resume the continuation exactly once.
243243
///
244244
/// - Returns: The value passed to the continuation by the closure.
245245
///
@@ -259,7 +259,7 @@ public func withUnsafeContinuation<T>(
259259
/// then calls the given closure with the an unsafe throwing continuation for the current task.
260260
///
261261
/// - Parameter fn: A closure that takes an `UnsafeContinuation` parameter.
262-
/// The closure must resume the continuation exactly once.
262+
/// You must resume the continuation exactly once.
263263
///
264264
/// - Returns: The value passed to the continuation by the closure.
265265
@available(SwiftStdlib 5.5, *)

0 commit comments

Comments
 (0)