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);

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

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

Name

Description

result

destination for whether permission is granted

numActions

number of actions requested

now

current time on this throttle's configured clock

Created with MrDocs