BloombergLP::bdlmt::Throttle::requestPermissionIfValid

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

Synopsis

Declared in <bdlmt_throttle.h>

int
requestPermissionIfValid(
    bool* result,
    int numActions,
    bsls::TimeInterval const& now);

Return Value

0 if the arguments are valid, and a non-zero value otherwise

Parameters

NameDescription
resultdestination for whether permission is granted
numActionsnumber of actions requested
nowcurrent time on this throttle's configured clock