public void OnComplete()
        {
            if (eager)
            {
                if (Interlocked.CompareExchange(ref once, 1, 0) == 0)
                {
                    try
                    {
                        disposeState();
                    }
                    catch (Exception ex)
                    {
                        actual.OnError(ex);
                        return;
                    }
                }
            }

            actual.OnComplete();

            if (!eager)
            {
                Clear();
            }
        }
Exemplo n.º 2
0
        public void Subscribe(ICompletableSubscriber s)
        {
            CompletableInnerDisposable cid = new CompletableInnerDisposable(s, this);

            s.OnSubscribe(cid);

            if (Add(cid))
            {
                if (cid.IsDisposed())
                {
                    Remove(cid);
                }
            }
            else
            {
                Exception e = error;
                if (e != null)
                {
                    s.OnError(e);
                }
                else
                {
                    s.OnComplete();
                }
            }
        }
Exemplo n.º 3
0
 public void OnComplete()
 {
     if (Interlocked.Decrement(ref wip) == 0)
     {
         all.Dispose();
         actual.OnComplete();
     }
 }
 public void OnComplete()
 {
     if (Interlocked.CompareExchange(ref once, 1, 0) == 0)
     {
         all.Dispose();
         actual.OnComplete();
     }
 }
Exemplo n.º 5
0
        public void OnComplete()
        {
            IDisposable t = scheduler.ScheduleDirect(() =>
            {
                actual.OnComplete();
            });

            DisposableHelper.Replace(ref task, t);
        }
Exemplo n.º 6
0
            public void OnComplete()
            {
                if (mode == 1)
                {
                    mode = 2;

                    actual.OnComplete();
                }
            }
        public void OnComplete()
        {
            try {
                onCompleteCall();
            } catch (Exception e)
            {
                OnError(e);
                return;
            }

            actual.OnComplete();

            try {
                onAfterTerminate();
            } catch (Exception e)
            {
                RxAdvancedFlowPlugins.OnError(e);
            }
        }
        public void OnComplete()
        {
            if (Interlocked.Increment(ref wip) == 1)
            {
                do
                {
                    if (DisposableHelper.IsTerminated(ref d))
                    {
                        return;
                    }

                    if (it.MoveNext())
                    {
                        ICompletable c = it.Current;

                        c.Subscribe(this);
                    }
                    else
                    {
                        actual.OnComplete();
                    }
                } while (Interlocked.Decrement(ref wip) != 0);
            }
        }
Exemplo n.º 9
0
 public void OnComplete()
 {
     actual.OnComplete();
 }
Exemplo n.º 10
0
 public void OnCompleted()
 {
     cs.OnComplete();
 }
Exemplo n.º 11
0
 public void OnSuccess(T t)
 {
     cs.OnComplete();
 }
Exemplo n.º 12
0
 public static void Complete(ICompletableSubscriber cs)
 {
     cs.OnSubscribe(Instance);
     cs.OnComplete();
 }