Esempio 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>();
         }));
     }
 }
Esempio 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>());
         }));
     }
 }