public ObserveOnObserverNew(IScheduler scheduler, IObserver <T> downstream) { this.downstream = downstream; this.scheduler = scheduler; longRunning = scheduler.AsLongRunning(); queue = new ConcurrentQueue <T>(); }
public _(LongRunning parent, IObserver <TSource> observer) : base(observer) { _source = parent._source; _scheduler = parent._longRunningScheduler; _prepends = parent._prepends; _appends = parent._appends; }
public ObserveOnObserverNew(IScheduler scheduler, IObserver <T> downstream, IDisposable upstream) { this.downstream = downstream; this.scheduler = scheduler; this.longRunning = scheduler.AsLongRunning(); this.queue = new ConcurrentQueue <T>(); Volatile.Write(ref this.upstream, upstream); }
public LongRunning(IObservable <TSource> source, Node <TSource> prepends, Node <TSource> appends, IScheduler scheduler, ISchedulerLongRunning longRunningScheduler) { _source = source; _appends = appends; _prepends = prepends; Scheduler = scheduler; _longRunningScheduler = longRunningScheduler; }
private Notification <TSource> _completion; // completion notification public LoopSubscription(IObservable <TSource> source, int maxQueueSize, ISchedulerLongRunning scheduler, IObserver <TSource> observer) { _observer = observer; _queue = Queue.Create(maxQueueSize); scheduler.ScheduleLongRunning(_ => Loop()); _subscription.Disposable = source.Subscribe( OnNext, error => OnCompletion(Notification.CreateOnError <TSource>(error)), () => OnCompletion(Notification.CreateOnCompleted <TSource>())); }
private IDisposable Run(ISchedulerLongRunning scheduler) { if (_parent._repeatCount == null) { return(scheduler.ScheduleLongRunning(LoopInf)); } else { return(scheduler.ScheduleLongRunning(_parent._repeatCount.Value, Loop)); } }
public ScheduledObserver(IScheduler scheduler, IObserver <T> observer) { _scheduler = scheduler; _observer = observer; _longRunning = _scheduler.AsLongRunning(); if (_longRunning != null) { _dispatcherEvent = new SemaphoreSlim(0); } }
public ScheduledObserver(IScheduler scheduler, IObserver <T> observer) { _scheduler = scheduler; _observer = observer; _longRunning = _scheduler.AsLongRunning(); if (_longRunning != null) { _dispatcherEvent = new SemaphoreSlim(0); _dispatcherEventRelease = Disposable.Create(() => _dispatcherEvent.Release()); } }
/// <summary> /// Schedules an action to be executed. /// </summary> /// <param name="scheduler">Scheduler to execute the action on.</param> /// <param name="action">Action to execute.</param> /// <returns>The disposable object used to cancel the scheduled action (best effort).</returns> /// <exception cref="ArgumentNullException"><paramref name="scheduler"/> or <paramref name="action"/> is null.</exception> public static IDisposable ScheduleLongRunning(this ISchedulerLongRunning scheduler, Action <ICancelable> action) { if (scheduler == null) { throw new ArgumentNullException(nameof(scheduler)); } if (action == null) { throw new ArgumentNullException(nameof(action)); } return(scheduler.ScheduleLongRunning(action, (a, c) => a(c))); }
public void Run(IEnumerable <TSource> source, ISchedulerLongRunning scheduler) { IEnumerator <TSource> e; try { e = source.GetEnumerator(); } catch (Exception exception) { ForwardOnError(exception); return; } SetUpstream(scheduler.ScheduleLongRunning((@this: this, e), static (tuple, cancelable) => [email protected](tuple.e, cancelable)));
public static IDisposable ScheduleLongRunning(this ISchedulerLongRunning scheduler, Action <ICancelable> action) { throw new NotImplementedException(); }
public RangeLongRunning(int start, int count, ISchedulerLongRunning scheduler) { _start = start; _count = count; _scheduler = scheduler; }
public void Run(ISchedulerLongRunning scheduler) { SetUpstream(scheduler.ScheduleLongRunning(this, static (@this, cancel) => @this.Loop(cancel))); }
public CatchSchedulerLongRunning(ISchedulerLongRunning scheduler, Func <TException, bool> handler) { _scheduler = scheduler; _handler = handler; }
public SchedulerLongRunning(IObservable <TSource> source, ISchedulerLongRunning scheduler) { _source = source; _scheduler = scheduler; }
public ToObservableLongRunning(IEnumerable <TSource> source, ISchedulerLongRunning scheduler) { _source = source; _scheduler = scheduler; }
public ObserveOnObserverLongRunning(ISchedulerLongRunning scheduler, IObserver <TSource> observer) : base(observer) { _scheduler = scheduler; _queue = new ConcurrentQueue <TSource>(); _suspendGuard = new object(); }
public ObserveOnObserverNew(IScheduler scheduler, IObserver <T> downstream) : base(downstream) { _scheduler = scheduler; _longRunning = scheduler.AsLongRunning(); _queue = new ConcurrentQueue <T>(); }
public void Run(ISchedulerLongRunning longRunning) { SetUpstream(longRunning.ScheduleLongRunning(this, static (@this, c) => @this.LoopInf(c))); }
public CountLongRunning(TResult value, int repeatCount, ISchedulerLongRunning scheduler) { _value = value; _scheduler = scheduler; _repeatCount = repeatCount; }
public LongRunningEmitter(IObserver <TSource> observer, ISchedulerLongRunning scheduler) { _observer = observer; scheduler.ScheduleLongRunning(_ => Loop()); }
public ForeverLongRunning(TResult value, ISchedulerLongRunning scheduler) { _value = value; _scheduler = scheduler; }
public void Run(ISchedulerLongRunning longRunning) { SetUpstream(longRunning.ScheduleLongRunning(this, (@this, cancel) => @this.Loop(cancel))); }