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 tried to replicated this concept in ActorRef::join (#468), which returns Future<Output = ()> which completes once an actor is stopped. But this doesn't give enough information. For testing for example you would also like to know if the actor stopped normally or returned an error (and wasn't restarted).
So I think we should expand the API: ActorRef::monitor(&self) -> Monitor, where Monitor is a Future<Output = ExitStatus>,
enumExitStatus{Ok,StoppedEarly,// Or Error.}
Some alternative names: JoinResult, RunResult, ExitResult, I'm not a huge fan of the Result suffix as that reminds me of the Result type, but many we can use that.
The text was updated successfully, but these errors were encountered:
A possible implementation would be for heph-inbox::Manager to implement fn set_exit_status(self, ExiStatus). Then a new Sender::monitor API similar to that of Sender::join, but it returns this ExitStatus.
Erlang has a concept of process monitoring, which allows a process (actor) to know if another process stopped. Some resources about them:
I tried to replicated this concept in
ActorRef::join
(#468), which returnsFuture<Output = ()>
which completes once an actor is stopped. But this doesn't give enough information. For testing for example you would also like to know if the actor stopped normally or returned an error (and wasn't restarted).So I think we should expand the API:
ActorRef::monitor(&self) -> Monitor
, whereMonitor
is aFuture<Output = ExitStatus>
,Some alternative names:
JoinResult
,RunResult
,ExitResult
, I'm not a huge fan of theResult
suffix as that reminds me of theResult
type, but many we can use that.The text was updated successfully, but these errors were encountered: