Пример #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));
 }
Пример #2
0
 private void RemoveWatcher(IActorRef watcher)
 {
     if (!WatchedBy.Contains(watcher))
     {
         return;
     }
     if (!UpdateWatchedBy(WatchedBy, WatchedBy.Remove(watcher)))
     {
         RemoveWatcher(watcher);
     }
 }