@@ -36,7 +36,7 @@ public protocol Executor: AnyObject, Sendable {
36
36
func enqueue( _ job: consuming ExecutorJob )
37
37
#endif // !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
38
38
39
- #if !$Embedded
39
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
40
40
// The functions below could have been added to a separate protocol,
41
41
// but doing that would then mean doing an `as?` cast in e.g.
42
42
// enqueueOnGlobalExecutor (in ExecutorBridge.swift), which is
@@ -51,7 +51,7 @@ public protocol Executor: AnyObject, Sendable {
51
51
@available ( SwiftStdlib 6 . 2 , * )
52
52
public protocol SchedulableExecutor : Executor {
53
53
54
- #if !$Embedded
54
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
55
55
56
56
/// Enqueue a job to run after a specified delay.
57
57
///
@@ -94,7 +94,7 @@ public protocol SchedulableExecutor: Executor {
94
94
tolerance: C . Duration ? ,
95
95
clock: C )
96
96
97
- #endif // !$Embedded
97
+ #endif // !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
98
98
99
99
}
100
100
@@ -125,7 +125,7 @@ extension Executor where Self: Equatable {
125
125
126
126
extension Executor {
127
127
128
- #if !$Embedded
128
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
129
129
// This defaults to `false` so that existing third-party Executor
130
130
// implementations will work as expected.
131
131
@available ( SwiftStdlib 6 . 2 , * )
@@ -138,7 +138,7 @@ extension Executor {
138
138
@available ( SwiftStdlib 6 . 2 , * )
139
139
extension SchedulableExecutor {
140
140
141
- #if !$Embedded
141
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
142
142
143
143
@available ( SwiftStdlib 6 . 2 , * )
144
144
public func enqueue< C: Clock > ( _ job: consuming ExecutorJob ,
@@ -162,7 +162,7 @@ extension SchedulableExecutor {
162
162
tolerance: tolerance, clock: clock)
163
163
}
164
164
165
- #endif // !$Embedded
165
+ #endif // !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
166
166
}
167
167
168
168
/// A service that executes jobs.
@@ -331,7 +331,7 @@ public protocol SerialExecutor: Executor {
331
331
@available ( SwiftStdlib 6 . 0 , * )
332
332
extension SerialExecutor {
333
333
334
- #if !$Embedded
334
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
335
335
@available ( SwiftStdlib 6 . 2 , * )
336
336
public var isMainExecutor : Bool { return MainActor . executor. _isSameExecutor ( self ) }
337
337
#endif
@@ -542,13 +542,13 @@ public protocol ExecutorFactory {
542
542
@available ( SwiftStdlib 6 . 2 , * )
543
543
@_silgen_name ( " swift_createExecutors " )
544
544
public func _createExecutors< F: ExecutorFactory > ( factory: F . Type ) {
545
- #if !$Embedded
545
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
546
546
MainActor . _executor = factory. mainExecutor
547
547
#endif
548
548
Task . _defaultExecutor = factory. defaultExecutor
549
549
}
550
550
551
- #if !$Embedded
551
+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
552
552
extension MainActor {
553
553
@available ( SwiftStdlib 6 . 2 , * )
554
554
static var _executor : ( any MainExecutor ) ? = nil
@@ -566,7 +566,7 @@ extension MainActor {
566
566
return _executor!
567
567
}
568
568
}
569
- #endif // !$Embedded
569
+ #endif // !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
570
570
571
571
extension Task where Success == Never , Failure == Never {
572
572
@available ( SwiftStdlib 6 . 2 , * )
0 commit comments