Example #1
0
            internal ZipConditionalSubscription(IConditionalSubscriber <R> actual, int n, Func <T[], R> zipper, int prefetch, bool delayErrors)
            {
                this.actual = actual;
                this.zipper = zipper;

                this.current = new T[n];
                var a = new ZipInnerSubscriber[n];

                for (int i = 0; i < n; i++)
                {
                    a[i] = new ZipInnerSubscriber(this, prefetch);
                }

                this.subscribers = a;
                this.delayErrors = delayErrors;
            }
Example #2
0
            public void InnerError(ZipInnerSubscriber inner, Exception ex)
            {
                if (ExceptionHelper.AddError(ref error, ex))
                {
                    inner.SetDone();

                    if (!delayErrors)
                    {
                        CancelAll();
                    }

                    Drain();
                }
                else
                {
                    ExceptionHelper.OnErrorDropped(ex);
                }
            }