@@ -151,6 +151,23 @@ public struct CheckedContinuation<T> {
151151 }
152152}
153153
154+ extension CheckedContinuation where T == Void {
155+ /// Resume the task awaiting the continuation by having it return normally
156+ /// from its suspension point.
157+ ///
158+ /// A continuation must be resumed exactly once. If the continuation has
159+ /// already been resumed through this object, then the attempt to resume
160+ /// the continuation again will trap.
161+ ///
162+ /// After `resume` enqueues the task, control is immediately returned to
163+ /// the caller. The task will continue executing when its executor is
164+ /// able to reschedule it.
165+ @inlinable
166+ public func resume( ) {
167+ self . resume ( returning: ( ) )
168+ }
169+ }
170+
154171public func withCheckedContinuation< T> (
155172 function: String = #function,
156173 _ body: ( CheckedContinuation < T > ) -> Void
@@ -264,6 +281,23 @@ public struct CheckedThrowingContinuation<T> {
264281 }
265282}
266283
284+ extension CheckedThrowingContinuation where T == Void {
285+ /// Resume the task awaiting the continuation by having it return normally
286+ /// from its suspension point.
287+ ///
288+ /// A continuation must be resumed exactly once. If the continuation has
289+ /// already been resumed through this object, then the attempt to resume
290+ /// the continuation again will trap.
291+ ///
292+ /// After `resume` enqueues the task, control is immediately returned to
293+ /// the caller. The task will continue executing when its executor is
294+ /// able to reschedule it.
295+ @inlinable
296+ public func resume( ) {
297+ self . resume ( returning: ( ) )
298+ }
299+ }
300+
267301public func withCheckedThrowingContinuation< T> (
268302 function: String = #function,
269303 _ body: ( CheckedThrowingContinuation < T > ) -> Void
0 commit comments