You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think catch_unwind is the recommended way to handle subsystem panics, whether that's request handling in web servers or actors in an actor system.
One potential issue is that the subsystem's result type needs to be UnwindSafe, which is similar to Send / Sync thread safety. For portal this means that the Actor::Error type needs to be UnwindSafe and it seems all actors use anyhow::Error, which is indeed UnwindSafe 😌
I don't think it's optimal to make errors/panics trigger system shutdown (as opposed to just actor restart) but it seems reasonable to treat errors and panics the same for the time being.
We could unconditionally convert actor panics into actor system shutdown, or perhaps allow users to supply a callback that decides the fate.
The text was updated successfully, but these errors were encountered: