@@ -16,7 +16,6 @@ import Swift
16
16
@_silgen_name ( " swift_continuation_logFailedCheck " )
17
17
internal func logFailedCheck( _ message: UnsafeRawPointer )
18
18
19
- #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
20
19
/// Implementation class that holds the `UnsafeContinuation` instance for
21
20
/// a `CheckedContinuation`.
22
21
@available( SwiftStdlib 5 . 1 , * )
@@ -83,9 +82,7 @@ internal final class CheckedContinuationCanary: @unchecked Sendable {
83
82
}
84
83
}
85
84
}
86
- #endif
87
85
88
- #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
89
86
/// A mechanism to interface
90
87
/// between synchronous and asynchronous code,
91
88
/// logging correctness violations.
@@ -299,65 +296,4 @@ public func withCheckedThrowingContinuation<T>(
299
296
body ( CheckedContinuation ( continuation: $0, function: function) )
300
297
}
301
298
}
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
- }
338
299
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