BloombergLP::bslmt::Sluice::timedWait

timedWait overloads

Synopses

Declared in <bslmt_sluice.h>

Wait for the specified token to be signaled, or until the specified absTime timeout expires. absTime is an absolute time represented as an interval from some epoch, which is determined by the clock indicated at construction (see {Supported Clock-Types} in the component-level documentation). Return 0 on success, and e_TIMED_OUT on timeout. Any other value indicates that an error has occurred. Errors are unrecoverable. After an error, the sluice may be destroyed, but any other use has undefined behavior. The token is released whether or not a timeout occurred. The behavior is undefined unless token was obtained from a call to enter by this thread, and was not subsequently released (via a call to timedWait or wait).

int
timedWait(
    void const* token,
    bsls::TimeInterval const& absTime);
» more...

Wait for the specified token to be signaled, or until the specified absTime timeout expires. absTime is an absolute time represented as an interval from some epoch, which is determined by the clock associated with the time point. Return 0 on success, and e_TIMED_OUT on timeout. Any other value indicates that an error has occurred. Errors are unrecoverable. After an error, the sluice may be destroyed, but any other use has undefined behavior. The token is released whether or not a timeout occurred. The behavior is undefined unless token was obtained from a call to enter by this thread, and was not subsequently released (via a call to timedWait or wait).

template<
    class CLOCK,
    class DURATION>
int
timedWait(
    void const* token,
    bsl::chrono::time_point<CLOCK, DURATION> const& absTime);
» more...