BloombergLP::bdlmt::Throttle::requestPermissionIfValid

requestPermissionIfValid overloads

Synopses

Declared in <bdlmt_throttle.h>

Load whether taking numActions would not exceed this throttle's limit.

int
requestPermissionIfValid(
    bool* result,
    int numActions);
» more...

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

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

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