Esempio n. 1
0
 /// <summary>
 /// Returns false if the <see cref="_promise"/> is already completed.
 /// </summary>
 private bool AddWatcher(IActorRef watcher)
 {
     if (WatchedBy.Contains(watcher))
     {
         return(false);
     }
     return(UpdateWatchedBy(WatchedBy, WatchedBy.Add(watcher)) || AddWatcher(watcher));
 }
Esempio n. 2
0
 private void RemoveWatcher(IActorRef watcher)
 {
     if (!WatchedBy.Contains(watcher))
     {
         return;
     }
     if (!UpdateWatchedBy(WatchedBy, WatchedBy.Remove(watcher)))
     {
         RemoveWatcher(watcher);
     }
 }