Skip to content

Commit 1a15eb1

Browse files
committed
[Concurrency] Remove extraneous copies of withUnsafe(Throwing)Continuation
1 parent 08d9680 commit 1a15eb1

File tree

2 files changed

+6
-31
lines changed

2 files changed

+6
-31
lines changed

stdlib/public/Concurrency/PartialAsyncTask.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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
8486
public 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
9398
public func withUnsafeThrowingContinuation<T>(
9499
_ fn: (UnsafeThrowingContinuation<T>) -> Void

stdlib/public/Concurrency/Task.swift

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff 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")
377347
func getJobFlags(_ task: Builtin.NativeObject) -> Task.JobFlags
378348

0 commit comments

Comments
 (0)