We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9df8944 commit ace5f49Copy full SHA for ace5f49
stdlib/public/Concurrency/Task.swift
@@ -755,12 +755,8 @@ func _getCurrentThreadPriority() -> Int
755
@_alwaysEmitIntoClient
756
@usableFromInline
757
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.
762
#if compiler(>=5.5) && $Sendable
763
- detach { await body() }
+ async { await body() }
764
#endif
765
}
766
0 commit comments