Skip to content

Commit b882a12

Browse files
authored
Merge pull request #37070 from DougGregor/bridged-async-via-async
2 parents 9661109 + ace5f49 commit b882a12

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -775,12 +775,8 @@ func _getCurrentThreadPriority() -> Int
775775
@_alwaysEmitIntoClient
776776
@usableFromInline
777777
internal func _runTaskForBridgedAsyncMethod(_ body: @escaping () async -> Void) {
778-
// TODO: We can probably do better than detach
779-
// if we're already running on behalf of a task,
780-
// if the receiver of the method invocation is itself an Actor, or in other
781-
// situations.
782778
#if compiler(>=5.5) && $Sendable
783-
detach { await body() }
779+
async { await body() }
784780
#endif
785781
}
786782

0 commit comments

Comments
 (0)