How to wait for anchor class instance creation?

  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.

When I create an instance of an actor class, how can I wait till instance creation?

Basically, my actor class instructor (__init__ function) is taking time. So how can I wait for that, while creating new instance of this class?

The normal pattern is implementing a ping method to check if an actor is ready:

@ray.remote
class Actor:
   def ping(self):
       pass

actor = Actor.remote()
ray.get(actor.ping.remote())
// Now the actor is ready to use

Okay. Got it.
Thanks.