tiny-tokio-actor
tiny-tokio-actor copied to clipboard
a clean way for an actor to restart itself
i might just be ignorant and abusing the design pattern, but i was trying to leverage the retry behavior of the library and was manually calling pre_restart from a handle method which results in a deadlock. instead im now creating a task on pre_start and then telling myself from the task to respawn the task such that pre_start only gets called once in the lifetime of the actor.
Currently the restart only works to handle startup problems. It does not really work for handling message failures. This definitely needs to be addressed though!