void InnerError(Exception e, PublisherConcatMapEagerInner inner) { if (ExceptionHelper.Add(ref error, e)) { Volatile.Write(ref done, true); inner.SetDone(); Drain(); } else { RxAdvancedFlowPlugins.OnError(e); } }
public void OnNext(T t) { IPublisher <R> p; try { p = mapper(t); } catch (Exception e) { s.Cancel(); OnError(e); return; } if (p == null) { s.Cancel(); OnError(new NullReferenceException("The mapper returned a null Publisher")); return; } PublisherConcatMapEagerInner inner = new PublisherConcatMapEagerInner(this, bufferSize); if (!bp.IsCancelled()) { q.Offer(inner); if (bp.IsCancelled()) { ClearDrain(); } else { p.Subscribe(inner); Drain(); } } }