@@ -17,25 +17,30 @@ import Swift
17
17
///
18
18
/// The \c Actor protocol generalizes over all actor types. Actor types
19
19
/// implicitly conform to this protocol.
20
+ @available ( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
20
21
public protocol Actor : AnyObject , Sendable {
21
22
}
22
23
23
24
/// Called to initialize the default actor instance in an actor.
24
25
/// The implementation will call this within the actor's initializer.
26
+ @available ( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
25
27
@_silgen_name ( " swift_defaultActor_initialize " )
26
28
public func _defaultActorInitialize( _ actor : AnyObject )
27
29
28
30
/// Called to destroy the default actor instance in an actor.
29
31
/// The implementation will call this within the actor's deinit.
32
+ @available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
30
33
@_silgen_name ( " swift_defaultActor_destroy " )
31
34
public func _defaultActorDestroy( _ actor : AnyObject )
32
35
33
36
/// FIXME: only exists for the quick-and-dirty MainActor implementation.
37
+ @available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
34
38
@_silgen_name ( " swift_MainActor_register " )
35
39
fileprivate func _registerMainActor( actor : AnyObject )
36
40
37
41
/// A singleton actor whose executor is equivalent to
38
42
/// \c DispatchQueue.main, which is the main dispatch queue.
43
+ @available( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
39
44
@globalActor public actor MainActor {
40
45
public static let shared = MainActor ( )
41
46
@@ -44,6 +49,7 @@ fileprivate func _registerMainActor(actor: AnyObject)
44
49
}
45
50
}
46
51
52
+ @available ( macOS 9999 , iOS 9999 , watchOS 9999 , tvOS 9999 , * )
47
53
extension MainActor {
48
54
/// Execute the given body closure on the main actor.
49
55
public static func run< T> (
0 commit comments