Describe the bug
Imagine a supervision tree with A -> B. If A panics its post_stop is not called as expected but ractor terminates all its children via normal stop with reason "Killed" and then post_stop is called for this situation.
The problem is that there's no way to identify on B's post_stop that it's being terminated because its supervisor was killed.
The documentation clearly says about post_stop:
Invoked after an actor has been stopped to perform final cleanup. In the event the actor is terminated with Signal::Kill or has self-> panicked, post_stop won't be called.
Panics in post_stop follow the supervision strategy.
For me, the actor should not trigger post_stop because it's a killed event or post_stop should have a parameter to identify the reason.
To Reproduce
Steps to reproduce the behavior:
Spawn an Actor A with post_stop
Spawn linked Actor B with post_stop
Send a message to actor A that panics/return an error.
See the post_stop from B being called.
Expected behavior
When Actor A panics, it should not trigger post_stop of Actor B.
Describe the bug Imagine a supervision tree with
A -> B
. IfA
panics itspost_stop
is not called as expected but ractor terminates all its children via normal stop with reason "Killed" and thenpost_stop
is called for this situation.The problem is that there's no way to identify on B's
post_stop
that it's being terminated because its supervisor was killed.The documentation clearly says about post_stop:
For me, the actor should not trigger
post_stop
because it's a killed event orpost_stop
should have a parameter to identify the reason.To Reproduce Steps to reproduce the behavior:
post_stop
post_stop
post_stop
from B being called.Expected behavior When Actor A panics, it should not trigger
post_stop
of Actor B.Additional context Ractor Version: 0.9.7 Rust Version: 1.76.0