Skip to content

Commit f40d90f

Browse files
committed
fix another unguarded use of MainActor
1 parent 18d976f commit f40d90f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ extension Task: Equatable {
186186
}
187187
}
188188

189+
#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
189190
@available(SwiftStdlib 5.9, *)
190191
extension Task where Failure == Error {
191192
@_spi(MainActorUtilities)
@@ -204,7 +205,9 @@ extension Task where Failure == Error {
204205
return Task<Success, Error>(task)
205206
}
206207
}
208+
#endif
207209

210+
#if !SWIFT_STDLIB_TASK_TO_THREAD_MODEL_CONCURRENCY
208211
@available(SwiftStdlib 5.9, *)
209212
extension Task where Failure == Never {
210213
@_spi(MainActorUtilities)
@@ -223,6 +226,7 @@ extension Task where Failure == Never {
223226
return Task(task)
224227
}
225228
}
229+
#endif
226230

227231
// ==== Task Priority ----------------------------------------------------------
228232

0 commit comments

Comments
 (0)