File tree Expand file tree Collapse file tree 2 files changed +6
-31
lines changed
stdlib/public/Concurrency Expand file tree Collapse file tree 2 files changed +6
-31
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,9 @@ internal func _resumeUnsafeThrowingContinuationWithError<T>(
79
79
80
80
#endif
81
81
82
- // Wrappers around unsafe continuation builtins
82
+ /// The operation functions must resume the continuation *exactly once*.
83
+ ///
84
+ /// The continuation will not begin executing until the operation function returns.
83
85
@_alwaysEmitIntoClient
84
86
public func withUnsafeContinuation< T> (
85
87
_ fn: ( UnsafeContinuation < T > ) -> Void
@@ -89,6 +91,9 @@ public func withUnsafeContinuation<T>(
89
91
}
90
92
}
91
93
94
+ /// The operation functions must resume the continuation *exactly once*.
95
+ ///
96
+ /// The continuation will not begin executing until the operation function returns.
92
97
@_alwaysEmitIntoClient
93
98
public func withUnsafeThrowingContinuation< T> (
94
99
_ fn: ( UnsafeThrowingContinuation < T > ) -> Void
Original file line number Diff line number Diff line change @@ -343,36 +343,6 @@ extension Task {
343
343
}
344
344
}
345
345
346
- // ==== UnsafeContinuation -----------------------------------------------------
347
-
348
- extension Task {
349
- /// The operation functions must resume the continuation *exactly once*.
350
- ///
351
- /// The continuation will not begin executing until the operation function returns.
352
- ///
353
- /// ### Suspension
354
- /// This function returns instantly and will never suspend.
355
- /* @instantaneous */
356
- public static func withUnsafeContinuation< T> (
357
- operation: ( UnsafeContinuation < T > ) -> Void
358
- ) async -> T {
359
- fatalError ( " \( #function) not implemented yet. " )
360
- }
361
-
362
- /// The operation functions must resume the continuation *exactly once*.
363
- ///
364
- /// The continuation will not begin executing until the operation function returns.
365
- ///
366
- /// ### Suspension
367
- /// This function returns instantly and will never suspend.
368
- /* @instantaneous */
369
- public static func withUnsafeThrowingContinuation< T> (
370
- operation: ( UnsafeThrowingContinuation < T > ) -> Void
371
- ) async throws -> T {
372
- fatalError ( " \( #function) not implemented yet. " )
373
- }
374
- }
375
-
376
346
@_silgen_name ( " swift_task_getJobFlags " )
377
347
func getJobFlags( _ task: Builtin . NativeObject ) -> Task . JobFlags
378
348
You can’t perform that action at this time.
0 commit comments