Open drozzy opened 10 years ago
Thanks for providing a good howto on how to implement a supervision pattern yourself. Supervision is mostly lacking from Pykka because of time/effort/need, and not because I oppose it. I'm interested in including it in a future Pykka 2.
I'll leave this bug open to either add the pattern to docs or to use it as basis for some future supervision support
Currently, the only way to know that the "child" actor failed, is to employ the 'ask' pattern:
However, if we are using tell, the is no way to "detect" a failure:
Akka handles this by registering an actor for "death watch": http://doc.akka.io/docs/akka/snapshot/general/supervision.html
In pykka we can implement a similar thing manually by providing an actor with a
parent
argument and overridingon_failure
in theMyActor
:Then the parent actor would simply have to handle it, like so:
P.S.: On the readme page, where it says what "pykka is not" --- supervision is one of the mentions. Is there any specific reasons (aside from time/effort) that its not? I.e. are you opposed to the idea?