Searched refs:remainingPermits (Results 1 – 1 of 1) sorted by relevance
941 long remainingPermits; in acquirePermits() local946 remainingPermits = permits.get(); in acquirePermits()947 if (remainingPermits == 0) in acquirePermits()949 grabbing = Math.min(remainingPermits, numElements); in acquirePermits()951 !permits.compareAndSet(remainingPermits, remainingPermits - grabbing)); in acquirePermits()955 else if (remainingPermits > skipThreshold) in acquirePermits()956 return Math.max(grabbing - (remainingPermits - skipThreshold), 0); in acquirePermits()