This is a followup of my previous question. When one should invoke resetProxy
and clearSelf
of Actor ? What are they actually useful for?
These methods are used when a "regular" thread ( not threads executing actors ) is talking to an actor. Since there isn't a proper actor sending a message to another actor a proxy actor is instantiated for the thread. You should use the clearSelf method when a thread is long lived and periodically talks to actors especially threads from a thread pool. This method clears the proxy actor created for the thread to have a conversation with other actors so it should be called at the end of an actor dialog. resetProxy is useful when you suspect a proxy actor has died during a dialog and plan to retry.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With