Skip to content

Conversation

@BrennanConroy
Copy link
Member

Depends on #387 so there aren't two PRs adding the test infra/csproj properties.

/// <summary>
/// <see cref="RateLimiter"/> implementation that replenishes tokens periodically instead of via a release mechanism.
/// </summary>
public sealed class TokenBucketRateLimiter : RateLimiter
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be disposable because of the _renewTimer? Even if AutoReplenishment is disabled, we probably would want to cancel all queued acquisition request because I doubt anyone will be calling TryReplenish() after disposal and we'll want to cancel all the Tasks and dispose all the CancellationTokenRegistrations.

Base automatically changed from brecon/concurrencylimiter to main October 26, 2021 20:02
Copy link
Member

@halter73 halter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's file an issue for making rate limiters disposable.

@BrennanConroy BrennanConroy merged commit df6e3f6 into main Nov 11, 2021
@BrennanConroy BrennanConroy deleted the brecon/tokenlimiter branch November 11, 2021 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants