Skip to content

Commit d6224d1

Browse files
committed
[Concurrency] Fix minimal stdlib build again.
Some mentions of `ExecutorJob` were not guarded by the required `SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY` condition.
1 parent ff8d2fa commit d6224d1

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

stdlib/public/Concurrency/Clock.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public protocol Clock<Duration>: Sendable {
7777
#endif
7878
}
7979

80+
#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
8081
extension Clock {
8182
// The default implementation works by creating a trampoline and calling
8283
// the run() method.
@@ -96,6 +97,7 @@ extension Clock {
9697
fatalError("\(Self.self) does not implement run(_:at:tolerance:).")
9798
}
9899
}
100+
#endif // !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
99101

100102
@available(StdlibDeploymentTarget 5.7, *)
101103
extension Clock {

stdlib/public/Concurrency/ContinuousClock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ extension ContinuousClock.Instant: InstantProtocol {
212212
}
213213
}
214214

215-
#if !$Embedded
215+
#if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
216216
@available(StdlibDeploymentTarget 6.2, *)
217217
extension ContinuousClock {
218218

stdlib/public/Concurrency/ExecutorImpl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ internal func donateToGlobalExecutor(
4747
@available(SwiftStdlib 6.2, *)
4848
@_silgen_name("swift_task_getMainExecutorImpl")
4949
internal func getMainExecutor() -> UnownedSerialExecutor {
50-
return _getMainExecutorAsSerialExecutor()
50+
return unsafe _getMainExecutorAsSerialExecutor()
5151
}
5252

5353
@available(SwiftStdlib 6.2, *)

stdlib/public/Concurrency/SuspendingClock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ extension SuspendingClock.Instant: InstantProtocol {
190190
}
191191
}
192192

193-
#if !$Embedded
193+
#if !$Embedded && !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
194194
@available(StdlibDeploymentTarget 6.2, *)
195195
extension SuspendingClock {
196196

0 commit comments

Comments
 (0)