Constructors

Synopses

Declared in <bslmt_timedsemaphore.h>

Create a timed semaphore initially having a count of 0. Optionally specify a clockType indicating the type of the system clock against which the absTime timeouts passed to the timedWait methods are to be interpreted (see {Supported Clock‐Types} in the component‐level documentation). If clockType is not specified then the realtime system clock is used. This method does not return normally unless there are sufficient system resources to construct the object.

explicit
TimedSemaphore(bsls::SystemClockType::Enum clockType = bsls::SystemClockType::e_REALTIME);

Create a timed semaphore initially having a count of 0. Use the monotonic system clock as the clock against which the absTime timeouts passed to the timedWait methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object.

explicit
TimedSemaphore(std::chrono::steady_clock const&);

Create a timed semaphore initially having a count of 0. Use the realtime system clock as the clock against which the absTime timeouts passed to the timedWait methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object.

explicit
TimedSemaphore(std::chrono::system_clock const&);

Create a timed semaphore initially having the specified count. Optionally specify a clockType indicating the type of the system clock against which the absTime timeouts passed to the timedWait methods are to be interpreted (see {Supported Clock‐Types} in the component‐level documentation). If clockType is not specified then the realtime system clock is used. This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless 0 <= count.

explicit
TimedSemaphore(
    int count,
    bsls::SystemClockType::Enum clockType = bsls::SystemClockType::e_REALTIME);

Create a timed semaphore initially having the specified count. Use the monotonic system clock as the clock against which the absTime timeouts passed to the timedWait methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless 0 <= count.

TimedSemaphore(
    int count,
    std::chrono::steady_clock const&);

Create a timed semaphore initially having the specified count. Use the realtime system clock as the clock against which the absTime timeouts passed to the timedWait methods are interpreted (see {Supported Clock‐Types} in the component‐level documentation). This method does not return normally unless there are sufficient system resources to construct the object. The behavior is undefined unless 0 <= count.

TimedSemaphore(
    int count,
    std::chrono::system_clock const&);

Created with MrDocs