@@ -16,7 +16,6 @@ import Swift
1616@_silgen_name ( " swift_continuation_logFailedCheck " )
1717internal func logFailedCheck( _ message: UnsafeRawPointer )
1818
19- #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
2019/// Implementation class that holds the `UnsafeContinuation` instance for
2120/// a `CheckedContinuation`.
2221@available( SwiftStdlib 5 . 1 , * )
@@ -83,9 +82,7 @@ internal final class CheckedContinuationCanary: @unchecked Sendable {
8382 }
8483 }
8584}
86- #endif
8785
88- #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
8986/// A mechanism to interface
9087/// between synchronous and asynchronous code,
9188/// logging correctness violations.
@@ -299,65 +296,4 @@ public func withCheckedThrowingContinuation<T>(
299296 body ( CheckedContinuation ( continuation: $0, function: function) )
300297 }
301298}
302- #else
303- @available ( SwiftStdlib 5 . 1 , * )
304- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
305- public struct CheckedContinuation < T, E: Error > : Sendable {
306- @available ( SwiftStdlib 5 . 1 , * )
307- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
308- public init ( continuation: UnsafeContinuation < T , E > , function: String = #function) {
309- fatalError ( " Unavailable in task-to-thread concurrency model " )
310- }
311-
312- @available ( SwiftStdlib 5 . 1 , * )
313- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
314- public func resume( returning value: __owned T) {
315- fatalError ( " Unavailable in task-to-thread concurrency model " )
316- }
317-
318- @available ( SwiftStdlib 5 . 1 , * )
319- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
320- public func resume( throwing error: __owned E) {
321- fatalError ( " Unavailable in task-to-thread concurrency model " )
322- }
323- }
324- @available ( SwiftStdlib 5 . 1 , * )
325- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
326- extension CheckedContinuation {
327- @available ( SwiftStdlib 5 . 1 , * )
328- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
329- public func resume< Er: Error > ( with result: Result < T , Er > ) where E == Error {
330- fatalError ( " Unavailable in task-to-thread concurrency model " )
331- }
332-
333- @available ( SwiftStdlib 5 . 1 , * )
334- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
335- public func resume( with result: Result < T , E > ) {
336- fatalError ( " Unavailable in task-to-thread concurrency model " )
337- }
338299
339- @available ( SwiftStdlib 5 . 1 , * )
340- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
341- public func resume( ) where T == Void {
342- fatalError ( " Unavailable in task-to-thread concurrency model " )
343- }
344- }
345-
346- @available ( SwiftStdlib 5 . 1 , * )
347- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
348- public func withCheckedContinuation< T> (
349- function: String = #function,
350- _ body: ( CheckedContinuation < T , Never > ) -> Void
351- ) async -> T {
352- fatalError ( " Unavailable in task-to-thread concurrency model " )
353- }
354-
355- @available ( SwiftStdlib 5 . 1 , * )
356- @available ( * , unavailable, message: " Unavailable in task-to-thread concurrency model " )
357- public func withCheckedThrowingContinuation< T> (
358- function: String = #function,
359- _ body: ( CheckedContinuation < T , Error > ) -> Void
360- ) async throws -> T {
361- fatalError ( " Unavailable in task-to-thread concurrency model " )
362- }
363- #endif
0 commit comments