Skip to content

Commit 1ab41bf

Browse files
authored
Merge pull request #40661 from etcwilde/ewilde/concurrency/cleanup-run-async-main
Cleaning up _runAsyncMain a bit
2 parents b0f0cb2 + b6414b3 commit 1ab41bf

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/swift/AST/Attr.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ SIMPLE_DECL_ATTR(_noAllocation, NoAllocation,
695695
SIMPLE_DECL_ATTR(preconcurrency, Preconcurrency,
696696
OnFunc | OnConstructor | OnProtocol | OnGenericType | OnVar | OnSubscript |
697697
OnEnumElement | OnImport |
698-
ABIBreakingToAdd | ABIBreakingToRemove | APIBreakingToAdd | APIBreakingToRemove,
698+
ABIStableToAdd | ABIBreakingToRemove | APIStableToAdd | APIBreakingToRemove,
699699
125)
700700

701701
CONTEXTUAL_SIMPLE_DECL_ATTR(_const, CompileTimeConst,

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+
@_predatesConcurrency
839+
internal func _runAsyncMain(_ asyncFun: @Sendable @escaping () async throws -> ()) {
838840
Task.detached {
839841
do {
840842
#if !os(Windows)

0 commit comments

Comments
 (0)