@@ -151,6 +151,23 @@ public struct CheckedContinuation<T> {
151
151
}
152
152
}
153
153
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
+
154
171
public func withCheckedContinuation< T> (
155
172
function: String = #function,
156
173
_ body: ( CheckedContinuation < T > ) -> Void
@@ -264,6 +281,23 @@ public struct CheckedThrowingContinuation<T> {
264
281
}
265
282
}
266
283
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
+
267
301
public func withCheckedThrowingContinuation< T> (
268
302
function: String = #function,
269
303
_ body: ( CheckedThrowingContinuation < T > ) -> Void
0 commit comments