Skip to content

Unable to get whether permits are exhausted / wait until permits are replenished #40

@guynoga47

Description

@guynoga47

According to the definitions of AttemptAcquire and AcquireAsync, when given permitCount = 0, it is possible to check if the permits are exhausted or wait until the permits are replenished, respectively.

Here are the links to the definitions:

https://learn.microsoft.com/en-us/dotnet/api/system.threading.ratelimiting.ratelimiter.attemptacquire?view=aspnetcore-7.0

https://learn.microsoft.com/en-us/dotnet/api/system.threading.ratelimiting.ratelimiter.acquireasync?view=aspnetcore-7.0

I would be happy to know if there is any workaround to check the actual state of the permits without acquiring a lease.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions