BloombergLP::bdlmt::Throttle::requestPermission

Return whether taking numActions at now would not exceed the limit.

Synopsis

Declared in <bdlmt_throttle.h>

bool
requestPermission(
    int numActions,
    bsls::TimeInterval const& now);

Return Value

true if permission is granted, and false otherwise

Parameters

NameDescription
numActionsnumber of actions requested
nowcurrent time on this throttle's configured clock