@@ -293,8 +293,10 @@ internal func _resumeUnsafeThrowingContinuationWithError<T>(
293
293
294
294
#endif
295
295
296
- /// Suspends the current task,
297
- /// then calls the given closure with an unsafe continuation for the current task.
296
+ /// Invokes the passed in closure and provides with an unsafe continuation for the current task.
297
+ /// The body of the closure executes synchronously on the calling task, and once it returns
298
+ /// the calling task is suspended. It is possible to immediately resume the task, or escape the
299
+ /// continuation in order to complete it afterwards, and thus resuming the suspended task.
298
300
///
299
301
/// - Parameter fn: A closure that takes an `UnsafeContinuation` parameter.
300
302
/// You must resume the continuation exactly once.
@@ -311,8 +313,10 @@ public func withUnsafeContinuation<T>(
311
313
}
312
314
}
313
315
314
- /// Suspends the current task,
315
- /// then calls the given closure with an unsafe throwing continuation for the current task.
316
+ /// Invokes the passed in closure and provides with a unsafe throwing continuation for the current task.
317
+ /// The body of the closure executes synchronously on the calling task, and once it returns
318
+ /// the calling task is suspended. It is possible to immediately resume the task, or escape the
319
+ /// continuation in order to complete it afterwards, and thus resuming the suspended task.
316
320
///
317
321
/// - Parameter fn: A closure that takes an `UnsafeContinuation` parameter.
318
322
/// You must resume the continuation exactly once.
0 commit comments