@@ -36,11 +36,9 @@ 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
40
39
/// `true` if this is the main executor.
41
40
@available ( StdlibDeploymentTarget 6 . 2 , * )
42
41
var isMainExecutor : Bool { get }
43
- #endif
44
42
}
45
43
46
44
@available ( StdlibDeploymentTarget 6 . 2 , * )
@@ -145,12 +143,10 @@ extension Executor where Self: Equatable {
145
143
146
144
extension Executor {
147
145
148
- #if !$Embedded
149
146
// This defaults to `false` so that existing third-party Executor
150
147
// implementations will work as expected.
151
148
@available ( StdlibDeploymentTarget 6 . 2 , * )
152
149
public var isMainExecutor : Bool { false }
153
- #endif
154
150
155
151
}
156
152
@@ -368,7 +364,7 @@ public protocol SerialExecutor: Executor {
368
364
@available ( StdlibDeploymentTarget 6 . 0 , * )
369
365
extension SerialExecutor {
370
366
371
- #if !$Embedded && ! SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
367
+ #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
372
368
@available ( StdlibDeploymentTarget 6 . 2 , * )
373
369
public var isMainExecutor : Bool { return MainActor . executor. _isSameExecutor ( self ) }
374
370
#endif
@@ -579,11 +575,9 @@ public protocol MainExecutor: RunLoopExecutor, SerialExecutor {
579
575
/// executors.
580
576
@available ( StdlibDeploymentTarget 6 . 2 , * )
581
577
public protocol ExecutorFactory {
582
- #if !$Embedded
583
578
/// Constructs and returns the main executor, which is started implicitly
584
579
/// by the `async main` entry point and owns the "main" thread.
585
580
static var mainExecutor : any MainExecutor { get }
586
- #endif
587
581
588
582
/// Constructs and returns the default or global executor, which is the
589
583
/// default place in which we run tasks.
@@ -596,7 +590,7 @@ typealias DefaultExecutorFactory = PlatformExecutorFactory
596
590
@available ( StdlibDeploymentTarget 6 . 2 , * )
597
591
@_silgen_name ( " swift_createExecutors " )
598
592
public func _createExecutors< F: ExecutorFactory > ( factory: F . Type ) {
599
- #if !$Embedded && ! SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
593
+ #if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
600
594
MainActor . _executor = factory. mainExecutor
601
595
#endif
602
596
Task . _defaultExecutor = factory. defaultExecutor
0 commit comments