Exemplo n.º 1
0
            public void OnNext(T t)
            {
                BufferWork bw = new BufferWork();

                bw.value = t;
                lock (this)
                {
                    queue.Offer(bw);
                }
                Drain();
            }
            internal void otherNext()
            {
                var b = new BufferWork();

                b.type = BufferWorkType.BOUNDARY;

                lock (this)
                {
                    queue.Offer(b);
                }
                Drain();
            }
            public void OnNext(T t)
            {
                var b = new BufferWork();

                b.value = t;

                lock (this)
                {
                    queue.Offer(b);
                }
                Drain();
            }
            internal void otherComplete()
            {
                var b = new BufferWork();

                b.type = BufferWorkType.COMPLETE;

                lock (this)
                {
                    queue.Offer(b);
                }
                Drain();
            }
Exemplo n.º 5
0
            public void OnComplete()
            {
                d.Dispose();
                BufferWork bw = new BufferWork();

                bw.type = BufferWorkType.COMPLETE;
                lock (this)
                {
                    queue.Offer(bw);
                }
                Drain();
            }
            public void OnComplete()
            {
                other.Cancel();
                var b = new BufferWork();

                b.type = BufferWorkType.COMPLETE;

                lock (this)
                {
                    queue.Offer(b);
                }
                Drain();
            }
Exemplo n.º 7
0
            internal void CloseNext(BufferCloseSubscriber v)
            {
                var b = new BufferWork();

                b.type   = BufferWorkType.CLOSE;
                b.buffer = v;

                lock (this)
                {
                    queue.Offer(b);
                }
                Drain();
            }
Exemplo n.º 8
0
            internal void OpenNext(U u)
            {
                var b = new BufferWork();

                b.type   = BufferWorkType.OPEN;
                b.buffer = new BufferCloseSubscriber(this, u);

                lock (this)
                {
                    queue.Offer(b);
                }
                Drain();
            }
Exemplo n.º 9
0
 void Run(long index)
 {
     if (index == Volatile.Read(ref this.index))
     {
         BufferWork bw = new BufferWork();
         bw.type  = BufferWorkType.BOUNDARY;
         bw.index = index;
         lock (this)
         {
             queue.Offer(bw);
         }
         Drain();
     }
 }