@@ -36,7 +36,7 @@ public protocol Executor: AnyObject, Sendable {
3636 func enqueue( _ job: consuming ExecutorJob )
3737 #endif // !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
3838
39- #if !$Embedded
39+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
4040 // The functions below could have been added to a separate protocol,
4141 // but doing that would then mean doing an `as?` cast in e.g.
4242 // enqueueOnGlobalExecutor (in ExecutorBridge.swift), which is
@@ -51,7 +51,7 @@ public protocol Executor: AnyObject, Sendable {
5151@available ( SwiftStdlib 6 . 2 , * )
5252public protocol SchedulableExecutor : Executor {
5353
54- #if !$Embedded
54+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
5555
5656 /// Enqueue a job to run after a specified delay.
5757 ///
@@ -94,7 +94,7 @@ public protocol SchedulableExecutor: Executor {
9494 tolerance: C . Duration ? ,
9595 clock: C )
9696
97- #endif // !$Embedded
97+ #endif // !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
9898
9999}
100100
@@ -125,7 +125,7 @@ extension Executor where Self: Equatable {
125125
126126extension Executor {
127127
128- #if !$Embedded
128+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
129129 // This defaults to `false` so that existing third-party Executor
130130 // implementations will work as expected.
131131 @available ( SwiftStdlib 6 . 2 , * )
@@ -138,7 +138,7 @@ extension Executor {
138138@available ( SwiftStdlib 6 . 2 , * )
139139extension SchedulableExecutor {
140140
141- #if !$Embedded
141+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
142142
143143 @available ( SwiftStdlib 6 . 2 , * )
144144 public func enqueue< C: Clock > ( _ job: consuming ExecutorJob ,
@@ -162,7 +162,7 @@ extension SchedulableExecutor {
162162 tolerance: tolerance, clock: clock)
163163 }
164164
165- #endif // !$Embedded
165+ #endif // !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
166166}
167167
168168/// A service that executes jobs.
@@ -331,7 +331,7 @@ public protocol SerialExecutor: Executor {
331331@available ( SwiftStdlib 6 . 0 , * )
332332extension SerialExecutor {
333333
334- #if !$Embedded
334+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
335335 @available ( SwiftStdlib 6 . 2 , * )
336336 public var isMainExecutor : Bool { return MainActor . executor. _isSameExecutor ( self ) }
337337 #endif
@@ -542,13 +542,13 @@ public protocol ExecutorFactory {
542542@available ( SwiftStdlib 6 . 2 , * )
543543@_silgen_name ( " swift_createExecutors " )
544544public func _createExecutors< F: ExecutorFactory > ( factory: F . Type ) {
545- #if !$Embedded
545+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
546546 MainActor . _executor = factory. mainExecutor
547547 #endif
548548 Task . _defaultExecutor = factory. defaultExecutor
549549}
550550
551- #if !$Embedded
551+ #if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
552552extension MainActor {
553553 @available ( SwiftStdlib 6 . 2 , * )
554554 static var _executor : ( any MainExecutor ) ? = nil
@@ -566,7 +566,7 @@ extension MainActor {
566566 return _executor!
567567 }
568568}
569- #endif // !$Embedded
569+ #endif // !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
570570
571571extension Task where Success == Never , Failure == Never {
572572 @available ( SwiftStdlib 6 . 2 , * )
0 commit comments