Skip to content

Commit e660b70

Browse files
authored
Merge pull request swiftlang#36664 from DougGregor/old-compiler-new-concurrency
[Concurrency] Work around issue with old compilers and newer _Concurrency lib
2 parents 6f2dff9 + 46c9de8 commit e660b70

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,9 @@ internal func _runTaskForBridgedAsyncMethod(_ body: @escaping () async -> Void)
667667
// if we're already running on behalf of a task,
668668
// if the receiver of the method invocation is itself an Actor, or in other
669669
// situations.
670+
#if compiler(>=5.5) && $Sendable
670671
Task.runDetached { await body() }
672+
#endif
671673
}
672674

673675
#endif

0 commit comments

Comments
 (0)