5 writes to _tokenCount
System.Threading.RateLimiting (5)
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (5)
82
_tokenCount
= options.TokenLimit;
248
_tokenCount
-= tokenCount;
317
_tokenCount
= Math.Min(_options.TokenLimit, _tokenCount + add);
351
_tokenCount
-= nextPendingRequest.Count;
357
_tokenCount
+= nextPendingRequest.Count;
13 references to _tokenCount
System.Threading.RateLimiting (13)
System\Threading\RateLimiting\TokenBucketRateLimiter.cs (13)
99
CurrentAvailablePermits = (long)
_tokenCount
,
118
if (
_tokenCount
> 0)
152
if (tokenCount == 0 &&
_tokenCount
> 0)
219
int replenishAmount = tokenCount - (int)
_tokenCount
+ _queueCount;
233
if (
_tokenCount
>= tokenCount &&
_tokenCount
!= 0)
249
Debug.Assert(
_tokenCount
>= 0);
300
if (
_tokenCount
== _options.TokenLimit)
317
_tokenCount = Math.Min(_options.TokenLimit,
_tokenCount
+ add);
324
Debug.Assert(
_tokenCount
<= _options.TokenLimit);
342
else if (
_tokenCount
>= nextPendingRequest.Count)
352
Debug.Assert(
_tokenCount
>= 0);
384
if (
_tokenCount
== _options.TokenLimit)