I have an actor which creates a child actor to perform some lengthy computations.
The problem is that the initialization of the child actor takes a few seconds and all
I would suggest to send a "ready" message from the child actor to the parent and start sending messages to the child actor only after this message will be received. You can do it just in receive()
method for simple use cases or you can use become
or FSM
to change parent actor behavior after the child will be initialized (for example, store the messages for the child in some intermediate storage and send them all when it will be ready).