There's currently no synchronization feature for waiting for an actor to be fully started up and ready to receive messages. This feature would add a method .wait_startup().await which allows you to ensure an actor has fully started up.
Motivation
In some cases it might be useful to wait for an actor to be fully started up and ready to process messages.
Proposed Solution
Add a Arc<Notify> to the ActorRef which is notified when the actor finishes its startup process.
Alternatives Considered
Actors can manually add a Arc<Notify> to the state which is notified within the on_startup lifecycle hook.
Feature Description
There's currently no synchronization feature for waiting for an actor to be fully started up and ready to receive messages. This feature would add a method
.wait_startup().await
which allows you to ensure an actor has fully started up.Motivation
In some cases it might be useful to wait for an actor to be fully started up and ready to process messages.
Proposed Solution
Add a
Arc<Notify>
to theActorRef
which is notified when the actor finishes its startup process.Alternatives Considered
Actors can manually add a
Arc<Notify>
to the state which is notified within theon_startup
lifecycle hook.