public override void Request(long n)
 {
     if (SubscriptionHelper.Validate(n))
     {
         long u = BackpressureHelper.MultiplyCap(n, size);
         s.Request(u);
     }
 }
Esempio n. 2
0
 public void Request(long n)
 {
     if (OnSubscribeHelper.ValidateRequest(n))
     {
         long u = BackpressureHelper.MultiplyCap(n, size);
         s.Request(u);
     }
 }
 public override void Request(long n)
 {
     if (SubscriptionHelper.Validate(n))
     {
         if (Volatile.Read(ref once) == 0 && Interlocked.CompareExchange(ref once, 1, 0) == 0)
         {
             long u = BackpressureHelper.MultiplyCap(n - 1, skip);
             long v = BackpressureHelper.AddCap(u, size);
             s.Request(v);
         }
         else
         {
             long u = BackpressureHelper.MultiplyCap(n, skip);
             s.Request(u);
         }
     }
 }
Esempio n. 4
0
 public void Request(long n)
 {
     if (OnSubscribeHelper.ValidateRequest(n))
     {
         if (Volatile.Read(ref requestOnce) == 0 &&
             Interlocked.CompareExchange(ref requestOnce, 1, 0) == 0)
         {
             long u = BackpressureHelper.MultiplyCap(skip, n - 1);
             long v = BackpressureHelper.AddCap(u, n);
             s.Request(v);
         }
         else
         {
             long u = BackpressureHelper.MultiplyCap(skip, n);
             s.Request(u);
         }
     }
 }
 public override void Request(long n)
 {
     if (SubscriptionHelper.Validate(n))
     {
         if (!BackpressureHelper.PostCompleteRequest <IList <T> >(ref requested, n, actual, lists, ref cancelled))
         {
             if (Volatile.Read(ref once) == 0 && Interlocked.CompareExchange(ref once, 1, 0) == 0)
             {
                 long r = BackpressureHelper.MultiplyCap(n - 1, size - skip);
                 long u = BackpressureHelper.AddCap(r, size);
                 s.Request(u);
             }
             else
             {
                 long r = BackpressureHelper.MultiplyCap(n, size - skip);
                 s.Request(r);
             }
         }
     }
 }
Esempio n. 6
0
 public void Request(long n)
 {
     if (OnSubscribeHelper.ValidateRequest(n))
     {
         if (BackpressureHelper.PostCompleteRequest(ref requested, n, buffers, actual, ref cancelled))
         {
             if (Volatile.Read(ref once) == 0 && Interlocked.CompareExchange(ref once, 1, 0) == 0)
             {
                 long u = BackpressureHelper.MultiplyCap(skip, n - 1);
                 long v = BackpressureHelper.AddCap(size, u);
                 s.Request(v);
             }
             else
             {
                 long u = BackpressureHelper.MultiplyCap(skip, n);
                 s.Request(u);
             }
         }
     }
 }