public void InnerError(InnerSignalObserver <R> sender, Exception error)
 {
     if (Interlocked.CompareExchange(ref this.error, error, null) == null)
     {
         sender.SetDone();
         Volatile.Write(ref done, true);
         Drain();
     }
 }
 public void InnerComplete(InnerSignalObserver <R> sender)
 {
     sender.Dispose();
     if (Volatile.Read(ref active) == sender)
     {
         sender.SetDone();
         Drain();
     }
 }
 public void InnerError(InnerSignalObserver <R> sender, Exception error)
 {
     sender.Dispose();
     if (Volatile.Read(ref active) == sender)
     {
         if (delayErrors)
         {
             ExceptionHelper.AddException(ref errors, error);
             sender.SetDone();
             Drain();
         }
         else
         {
             if (Interlocked.CompareExchange(ref errors, error, null) == null)
             {
                 sender.SetDone();
                 Drain();
             }
         }
     }
 }
예제 #4
0
 public void InnerError(InnerSignalObserver <R> sender, Exception ex)
 {
     if (delayErrors)
     {
         ExceptionHelper.AddException(ref errors, ex);
     }
     else
     {
         Interlocked.CompareExchange(ref errors, ex, null);
     }
     sender.SetDone();
     Drain();
 }
 public void InnerComplete(InnerSignalObserver <R> sender)
 {
     sender.SetDone();
     Drain();
 }