Skip to content

Commit ace5f49

Browse files
committed
[Concurrency] Switch _runTaskForBridgedAsyncMethod over to using 'async'
1 parent 9df8944 commit ace5f49

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
@@ -755,12 +755,8 @@ func _getCurrentThreadPriority() -> Int
755755
@_alwaysEmitIntoClient
756756
@usableFromInline
757757
internal func _runTaskForBridgedAsyncMethod(_ body: @escaping () async -> Void) {
758-
// TODO: We can probably do better than detach
759-
// if we're already running on behalf of a task,
760-
// if the receiver of the method invocation is itself an Actor, or in other
761-
// situations.
762758
#if compiler(>=5.5) && $Sendable
763-
detach { await body() }
759+
async { await body() }
764760
#endif
765761
}
766762

0 commit comments

Comments
 (0)