<!--
{
  "availability" : [
    "*: -",
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "swift: -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/AnyActor",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:12_Concurrency8AnyActora"
  },
  "title" : "AnyActor"
}
-->

# AnyActor

Common marker protocol providing a shared “base” for both (local) `Actor`
and (potentially remote) `DistributedActor` types.

```
typealias AnyActor = AnyObject & Sendable
```

## Discussion

The `AnyActor` marker protocol generalizes over all actor types, including
distributed ones. In practice, this protocol can be used to restrict
protocols, or generic parameters to only be usable with actors, which
provides the guarantee that calls may be safely made on instances of given
type without worrying about the thread-safety of it – as they are
guaranteed to follow the actor-style isolation semantics.

While both local and distributed actors are conceptually “actors”, there are
some important isolation model differences between the two, which make it
impossible for one to refine the other.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)