@@ -235,16 +235,16 @@ internal func _resumeUnsafeThrowingContinuationWithError<T>(
235
235
236
236
#endif
237
237
238
- /// Calls the given closure with an unsafe continuation
239
- /// and returns its result .
238
+ /// Suspends the current task,
239
+ /// then calls the given closure with the an unsafe continuation for the current task .
240
240
///
241
241
/// - Parameter fn: A closure that takes an `UnsafeContinuation` parameter.
242
242
/// The closure must resume the continuation exactly once.
243
243
///
244
244
/// - Returns: The value passed to the continuation by the closure.
245
245
///
246
- /// The continuation won't start executing until the operation function returns.
247
- /// ◊TR: What does this mean?
246
+ /// If the closure calls `resume(throwing:)` on the continuation,
247
+ /// this method thows that error.
248
248
@available ( SwiftStdlib 5 . 5 , * )
249
249
@_alwaysEmitIntoClient
250
250
public func withUnsafeContinuation< T> (
@@ -255,16 +255,13 @@ public func withUnsafeContinuation<T>(
255
255
}
256
256
}
257
257
258
- /// Calls the given closure with an unsafe continuation
259
- /// and returns its result or throws its error .
258
+ /// Suspends the current task,
259
+ /// then calls the given closure with the an unsafe throwing continuation for the current task .
260
260
///
261
261
/// - Parameter fn: A closure that takes an `UnsafeContinuation` parameter.
262
262
/// The closure must resume the continuation exactly once.
263
263
///
264
264
/// - Returns: The value passed to the continuation by the closure.
265
- ///
266
- /// The continuation won't start executing until the operation function returns.
267
- /// ◊TR: What does this mean?
268
265
@available ( SwiftStdlib 5 . 5 , * )
269
266
@_alwaysEmitIntoClient
270
267
public func withUnsafeThrowingContinuation< T> (
0 commit comments