<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Distributed/DistributedActorSystem/actorReady(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Distributed"
    ],
    "preciseIdentifier" : "s:11Distributed0A11ActorSystemP10actorReadyyyqd__AA0aB0Rd__2IDQyd__0bF0RtzlF"
  },
  "title" : "actorReady(_:)"
}
-->

# actorReady(_:)

Invoked during a distributed actor’s initialization, as soon as it becomes fully initialized.

```
func actorReady<Act>(_ actor: Act) where Act : DistributedActor, Self.ActorID == Act.ID
```

## Parameters

`actor`

reference to the (local) actor that was just fully initialized.

## Discussion

The system is expected to store the reference to this actor, and maintain an `ActorID: DistributedActor`
mapping for the purpose of implementing the `resolve(id:as:)` method.

The system usually should NOT retain the passed reference, and it will be informed via
[`resignID(_:)`](/documentation/Distributed/DistributedActorSystem/resignID(_:)) when the actor has been deallocated so it can remove the stale reference from its
internal `ActorID: DistributedActor` mapping.

The [`id`](/documentation/Distributed/DistributedActor/id) of the passed actor must be an [`ActorID`](/documentation/Distributed/DistributedActorSystem/ActorID) that this system previously has assigned.

If `actorReady` gets called with some unknown ID, it should crash immediately as it signifies some
very unexpected use of the system.

---

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)