Skip to content

Commit 90b279b

Browse files
authored
Merge pull request #41933 from etcwilde/ewilde/concurrency-reland-runasyncmain-cleanups
Cleaning up _runAsyncMain
2 parents 5afa1b1 + 4700bc7 commit 90b279b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

stdlib/public/Concurrency/Task.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,9 @@ internal func _asyncMainDrainQueue() -> Never
834834
internal func _getMainExecutor() -> Builtin.Executor
835835

836836
@available(SwiftStdlib 5.1, *)
837-
public func _runAsyncMain(_ asyncFun: @escaping () async throws -> ()) {
837+
@usableFromInline
838+
@preconcurrency
839+
internal func _runAsyncMain(_ asyncFun: @Sendable @escaping () async throws -> ()) {
838840
Task.detached {
839841
do {
840842
#if !os(Windows)

test/api-digester/stability-concurrency-abi.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ Func AsyncSequence.map(_:) is now with @preconcurrency
5858
Func AsyncSequence.prefix(while:) is now with @preconcurrency
5959
Func MainActor.run(resultType:body:) has generic signature change from <T where T : Swift.Sendable> to <T>
6060
Func MainActor.run(resultType:body:) has mangled name changing from 'static Swift.MainActor.run<A where A: Swift.Sendable>(resultType: A.Type, body: @Swift.MainActor @Sendable () throws -> A) async throws -> A' to 'static Swift.MainActor.run<A>(resultType: A.Type, body: @Swift.MainActor @Sendable () throws -> A) async throws -> A'
61+
Func _runAsyncMain(_:) is now with @preconcurrency
6162
Protocol Actor has added inherited protocol AnyActor
6263
Protocol Actor has generic signature change from <Self : AnyObject, Self : Swift.Sendable> to <Self : _Concurrency.AnyActor>
6364
Struct CheckedContinuation has removed conformance to UnsafeSendable

0 commit comments

Comments
 (0)