Esempio n. 1
0
 public void OnComplete()
 {
     foreach (PublishProcessorInner inner in ProcessorHelper.Terminate(ref subscribers, Terminated))
     {
         inner.OnComplete();
     }
 }
Esempio n. 2
0
 public void OnError(Exception e)
 {
     error = e;
     foreach (PublishProcessorInner inner in ProcessorHelper.Terminate(ref subscribers, Terminated))
     {
         inner.OnError(e);
     }
 }
Esempio n. 3
0
 public void OnComplete()
 {
     Volatile.Write(ref done, true);
     foreach (var inner in ProcessorHelper.Terminate(ref subscribers, Terminated))
     {
         Drain(inner);
     }
 }
Esempio n. 4
0
 public void OnError(Exception e)
 {
     error = e;
     Volatile.Write(ref done, true);
     foreach (var inner in ProcessorHelper.Terminate(ref subscribers, Terminated))
     {
         Drain(inner);
     }
 }
Esempio n. 5
0
        public void OnComplete()
        {
            Volatile.Write(ref done, true);

            var a = ProcessorHelper.Terminate(ref subscribers, Terminated);

            foreach (PublisherCacheInner inner in a)
            {
                inner.Drain();
            }
        }
Esempio n. 6
0
        public void OnError(Exception e)
        {
            error = e;
            Volatile.Write(ref done, true);

            var a = ProcessorHelper.Terminate(ref subscribers, Terminated);

            foreach (PublisherCacheInner inner in a)
            {
                inner.Drain();
            }
        }
Esempio n. 7
0
        public void Cancel()
        {
            bp.Cancel();

            SubscriptionHelper.Terminate(ref this.s);

            PublisherMergeInner[] a = ProcessorHelper.Terminate(ref subscribers, Terminated);
            if (a != Terminated)
            {
                foreach (PublisherMergeInner inner in a)
                {
                    inner.Cancel();
                }
            }
        }
Esempio n. 8
0
            bool CheckTerminated(bool d, bool empty, PublisherPublishInner[] a)
            {
                if (a == Terminated)
                {
                    q.Clear();
                    return(true);
                }

                if (d)
                {
                    Exception e = error;
                    if (e != null)
                    {
                        q.Clear();

                        var b = ProcessorHelper.Terminate(ref subscribers, Terminated);
                        foreach (var inner in b)
                        {
                            inner.OnError(e);
                        }

                        return(true);
                    }
                    else
                    if (empty)
                    {
                        var b = ProcessorHelper.Terminate(ref subscribers, Terminated);
                        foreach (var inner in b)
                        {
                            inner.OnComplete();
                        }

                        return(true);
                    }
                }

                return(false);
            }
Esempio n. 9
0
            public void Dispose()
            {
                ProcessorHelper.Terminate(ref subscribers, Terminated);

                arbiter.Cancel();
            }