folly::channels::MaxConcurrentRateLimiter

A rate limiter that caps the number of concurrently running operations.

Synopsis

Declared in <folly/channels/MaxConcurrentRateLimiter.h>

class MaxConcurrentRateLimiter
    : public RateLimiter

Base Classes

NameDescription
RateLimiterA rate-limiter used by the channels framework to limit the number of in-flight requests.

Types

NameDescription
Token A token on destruction signals termination of the user provided function. So it's expected that a derived class override the destructor to provide the desired functionality. Or piggyback on destruction of the compiler generated overridden destructor.

Member Functions

NameDescription
executeWhenReady [virtual]Runs the function once a concurrency slot is available.
shared_from_this
weak_from_this

Static Member Functions

NameDescription
create Creates a rate limiter allowing at most maxConcurrent operations at once.

Protected Member Functions

Name
operator=

Friends

NameDescription
folly::channels::MaxConcurrentRateLimiter::Token