Skip to content

Commit 5ff7748

Browse files
authored
Merge pull request #37463 from DougGregor/runTaskForBridgedAsyncMethod-older-compilers
2 parents 3e538d6 + 9788cc2 commit 5ff7748

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,8 +831,10 @@ func _getCurrentThreadPriority() -> Int
831831
@_alwaysEmitIntoClient
832832
@usableFromInline
833833
internal func _runTaskForBridgedAsyncMethod(_ body: @escaping () async -> Void) {
834-
#if compiler(>=5.5) && $Sendable
834+
#if compiler(>=5.5) && $Sendable && $InheritActorContext && $ImplicitSelfCapture
835835
async { await body() }
836+
#else
837+
detach { await body() }
836838
#endif
837839
}
838840

0 commit comments

Comments
 (0)