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 9d697a5 commit 271d92fCopy full SHA for 271d92f
stdlib/public/Concurrency/Task.swift
@@ -854,12 +854,8 @@ func _getCurrentThreadPriority() -> Int
854
@_alwaysEmitIntoClient
855
@usableFromInline
856
internal func _runTaskForBridgedAsyncMethod(_ body: @escaping () async -> Void) {
857
- // TODO: We can probably do better than detach
858
- // if we're already running on behalf of a task,
859
- // if the receiver of the method invocation is itself an Actor, or in other
860
- // situations.
861
#if compiler(>=5.5) && $Sendable
862
- detach { await body() }
+ async { await body() }
863
#endif
864
}
865
0 commit comments