timedWait overloads
Synopses
Declared in <bslmt_fastpostsemaphore.h>
If this semaphore is initially disabled, or becomes disabled while blocking, return e_DISABLED with no effect on the count. Otherwise, block until the count of this semaphore is a positive value or the specified absTime timeout expires. If the count of this semaphore is a positive value, return 0 and atomically decrement the count. If the absTime timeout expires, return e_TIMED_OUT with no effect on the count. Return e_FAILED if an error occurs. Errors are unrecoverable. After an error, the semaphore may be destroyed, but any other use has undefined behavior. 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 documentation).
int
timedWait(bsls::TimeInterval const& absTime);
If this semaphore is initially disabled, or becomes disabled while blocking, return e_DISABLED with no effect on the count. Otherwise, block until the count of this semaphore is a positive value or the specified absTime timeout expires. If the count of this semaphore is a positive value, return 0 and atomically decrement the count. If the absTime timeout expires, return e_TIMEDOUT with no effect on the count. Return e_FAILED if an error occurs. Errors are unrecoverable. After an error, the semaphore may be destroyed, but any other use has undefined behavior. 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 documentation).
template<
class CLOCK,
class DURATION>
int
timedWait(bsl::chrono::time_point<CLOCK, DURATION> const& absTime);
Created with MrDocs