@@ -17,25 +17,30 @@ import Swift
1717///
1818/// The \c Actor protocol generalizes over all actor types. Actor types
1919/// implicitly conform to this protocol.
20+ @available ( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
2021public protocol Actor : AnyObject , Sendable {
2122}
2223
2324/// Called to initialize the default actor instance in an actor.
2425/// The implementation will call this within the actor's initializer.
26+ @available ( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
2527@_silgen_name ( " swift_defaultActor_initialize " )
2628public func _defaultActorInitialize( _ actor : AnyObject )
2729
2830/// Called to destroy the default actor instance in an actor.
2931/// The implementation will call this within the actor's deinit.
32+ @available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
3033@_silgen_name ( " swift_defaultActor_destroy " )
3134public func _defaultActorDestroy( _ actor : AnyObject )
3235
3336/// FIXME: only exists for the quick-and-dirty MainActor implementation.
37+ @available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
3438@_silgen_name ( " swift_MainActor_register " )
3539fileprivate func _registerMainActor( actor : AnyObject )
3640
3741/// A singleton actor whose executor is equivalent to
3842/// \c DispatchQueue.main, which is the main dispatch queue.
43+ @available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
3944@globalActor public actor MainActor {
4045 public static let shared = MainActor ( )
4146
@@ -44,6 +49,7 @@ fileprivate func _registerMainActor(actor: AnyObject)
4449 }
4550}
4651
52+ @available ( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
4753extension MainActor {
4854 /// Execute the given body closure on the main actor.
4955 public static func run< T> (
0 commit comments