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>(
7979
8080#endif
8181
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.
8385@_alwaysEmitIntoClient
8486public func withUnsafeContinuation< T> (
8587 _ fn: ( UnsafeContinuation < T > ) -> Void
@@ -89,6 +91,9 @@ public func withUnsafeContinuation<T>(
8991 }
9092}
9193
94+ /// The operation functions must resume the continuation *exactly once*.
95+ ///
96+ /// The continuation will not begin executing until the operation function returns.
9297@_alwaysEmitIntoClient
9398public func withUnsafeThrowingContinuation< T> (
9499 _ fn: ( UnsafeThrowingContinuation < T > ) -> Void
Original file line number Diff line number Diff line change @@ -343,36 +343,6 @@ extension Task {
343343 }
344344}
345345
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-
376346@_silgen_name ( " swift_task_getJobFlags " )
377347func getJobFlags( _ task: Builtin . NativeObject ) -> Task . JobFlags
378348
You can’t perform that action at this time.
0 commit comments