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.
2 parents 9661109 + ace5f49 commit b882a12Copy full SHA for b882a12
stdlib/public/Concurrency/Task.swift
@@ -775,12 +775,8 @@ func _getCurrentThreadPriority() -> Int
775
@_alwaysEmitIntoClient
776
@usableFromInline
777
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.
782
#if compiler(>=5.5) && $Sendable
783
- detach { await body() }
+ async { await body() }
784
#endif
785
}
786
0 commit comments