internal void Run() { if (Volatile.Read(ref requested)) { available = true; actual.OnNext(0); if (!DisposableHelper.IsDisposed(ref d)) { actual.OnComplete(); } } else { actual.OnError(BackpressureHelper.MissingBackpressureException()); } }
void Run() { if (fusionMode != FuseableHelper.NONE) { hasValue = true; actual.OnNext(default(T)); actual.OnComplete(); return; } T t; try { t = callable.Value; } catch (Exception ex) { ExceptionHelper.ThrowIfFatal(ex); if (!DisposableHelper.IsDisposed(ref cancel)) { actual.OnError(ex); cancel = null; } return; } if (!DisposableHelper.IsDisposed(ref cancel)) { actual.OnNext(t); if (!DisposableHelper.IsDisposed(ref cancel)) { actual.OnComplete(); cancel = null; } } }