-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How to stop an Actor? #27
Comments
any answer ? |
Sadly not. I had to create a special message requesting the Actor to "die". Once the actor receives that message, it kills itself. I would love to have an official way to kill actors, tho'. |
Hi @fermuch, apologies for the late response. You are totally right, there is no specific way to stop a single actor right now, as there would be different strategies to do it and we (@kanekotic and I) were designing which would be the best way. Can I ask you what would you consider the most efficient way to stop an actor to gather your feedback? Questions we were trying to answer:
Thanks a lot and sorry for the late response. |
I think there should be two ways to stopping an actor: request and force. REQUESTING
FORCING
Note: in both cases, the requester (sender) of the stop message should have the possibility to wait for the actor to be fully stopped, so a new actor can be spawned with the same details. By separating into these two, I think all use cases are solved. By requesting, you give the actor time to process its pending messages. And, if you need, you can kill it immediately. |
Suppose I have a system where I spawn an actor to manage each item in a list.
Once the item is removed from the list, how can I stop the Actor?
The text was updated successfully, but these errors were encountered: