[#BloombergLP-bslmt-TimedSemaphore] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::TimedSemaphore :relfileprefix: ../../ :mrdocs: This class implements a portable timed semaphore type for thread synchronization. It forwards all requests to an appropriate platform‐specific implementation. == Synopsis Declared in `<bslmt_timedsemaphore.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class TimedSemaphore; ---- == Enums [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmt/TimedSemaphore/_04enum.adoc[`Unnamed enum`] | Status codes for timed wait operations. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslmt/TimedSemaphore/2constructor-0a0.adoc[`TimedSemaphore`] [.small]#[constructor]# | Constructors | xref:BloombergLP/bslmt/TimedSemaphore/2destructor.adoc[`~TimedSemaphore`] [.small]#[destructor]# | Destroy this timed semaphore. | xref:BloombergLP/bslmt/TimedSemaphore/clockType.adoc[`clockType`] | Return the clock type used for timeouts. | xref:BloombergLP/bslmt/TimedSemaphore/post-00.adoc[`post`] | `post` overloads | xref:BloombergLP/bslmt/TimedSemaphore/timedWait-09.adoc[`timedWait`] | `timedWait` overloads | xref:BloombergLP/bslmt/TimedSemaphore/tryWait.adoc[`tryWait`] | If the count of this timed semaphore is positive, atomically decrement the count and return 0; otherwise, return a non‐zero value with no effect on the count. | xref:BloombergLP/bslmt/TimedSemaphore/wait.adoc[`wait`] | Block until the count of this timed semaphore is a positive value, then atomically decrement the count and return. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#