Ejemplo n.º 1
0
 public Unit ShutdownProcess(bool maintainState)
 {
     lock (sync)
     {
         return(Parent.Actor.Children.Find(Name.Value).IfSome(self =>
         {
             ShutdownProcessRec(self, sys.GetInboxShutdownItem().Map(x => (ILocalActorInbox)x.Inbox), maintainState);
             Parent.Actor.UnlinkChild(Id);
             children = Map.empty <string, ActorItem>();
         }));
     }
 }
Ejemplo n.º 2
0
 public Unit ShutdownProcess(bool maintainState)
 {
     cancellationTokenSource.Cancel();
     lock (sync)
     {
         return(Parent.Actor.Children.Find(Name.Value).IfSome(self =>
         {
             ShutdownProcessRec(self, sys.GetInboxShutdownItem().Map(x => (ILocalActorInbox)x.Inbox), maintainState);
             Parent.Actor.UnlinkChild(Id);
             children.Swap(_ => HashMap <string, ActorItem>());
         }));
     }
 }