Ejemplo n.º 1
0
            public override void OnNext(T value)
            {
                lock (gate)
                {
                    if (!open)
                    {
                        return;
                    }
                    observer.OnNext(value);
                    open = false;
                }

                var d = new SingleAssignmentDisposable();

                cancelable.Disposable = d;
                d.Disposable          = UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType)
                                        .Subscribe(tick);
            }
Ejemplo n.º 2
0
            public override void OnNext(T value)
            {
                ulong currentid;

                lock (gate)
                {
                    hasValue    = true;
                    latestValue = value;
                    id          = unchecked (id + 1);
                    currentid   = id;
                }

                var d = new SingleAssignmentDisposable();

                cancelable.Disposable = d;
                d.Disposable          = UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType)
                                        .Subscribe(new ThrottleFrameTick(this, currentid));
            }
Ejemplo n.º 3
0
 IDisposable RunTimer(ulong timerId)
 {
     return(UnityObservable.TimerFrame(parent.frameCount, parent.frameCountType)
            .Subscribe(new TimeoutFrameTick(this, timerId)));
 }