[#BloombergLP-bslmt-ConditionImpl-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ConditionImpl-02.adoc[ConditionImpl]&lt;xref:BloombergLP/bslmt/Platform/PosixThreads.adoc[Platform::PosixThreads]&gt;
:relfileprefix: ../../
:mrdocs:

This class provides a full specialization of `Condition` for pthreads&period; The implementation provided here defines an efficient proxy for the `pthread&lowbar;cond&lowbar;t` pthread type, and related operations&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;conditionimpl&lowbar;pthread&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;&gt;
class xref:BloombergLP/bslmt/ConditionImpl-02.adoc[ConditionImpl]&lt;xref:BloombergLP/bslmt/Platform/PosixThreads.adoc[Platform::PosixThreads]&gt;;
----

== Enums

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/ConditionImpl-00/_04enum.adoc[`Unnamed enum`] 
| The value `timedWait` returns when a timeout occurs&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/ConditionImpl-00/2constructor.adoc[`ConditionImpl`]         [.small]#[constructor]#
| Create a condition variable object&period; Optionally specify a `clockType` indicating the type of the system clock against which the `bsls&colon;&colon;TimeInterval` `absTime` timeouts passed to the `timedWait` method are to be interpreted (see &lcub;Supported Clock&hyphen;Types&rcub; in the component&hyphen;level documentation)&period; If `clockType` is not specified then the realtime system clock is used&period; This method does not return normally unless there are sufficient system resources to construct the object&period;
| xref:BloombergLP/bslmt/ConditionImpl-00/2destructor.adoc[`&#126;ConditionImpl`] [.small]#[destructor]#
| Destroy condition variable this object&period;
| xref:BloombergLP/bslmt/ConditionImpl-00/broadcast.adoc[`broadcast`] 
| Signal this condition object&semi; wake up all threads that are currently waiting on this condition&period;
| xref:BloombergLP/bslmt/ConditionImpl-00/clockType.adoc[`clockType`] 
| Return the clock type used for timeouts&period;
| xref:BloombergLP/bslmt/ConditionImpl-00/signal.adoc[`signal`] 
| Signal this condition object&semi; wake up a single thread that is currently waiting on this condition&period;
| xref:BloombergLP/bslmt/ConditionImpl-00/timedWait.adoc[`timedWait`] 
| Atomically unlock the specified `mutex` and suspend execution of the current thread until this condition object is &quot;signaled&quot; (i&period;e&period;, one of the `signal` or `broadcast` methods is invoked on this object) or until the specified `absTime` timeout expires, then re&hyphen;acquire a lock on the `mutex`&period; `absTime` is an _absolute_ time represented as an interval from some epoch, which is determined by the clock indicated at construction (see &lcub;Supported Clock&hyphen;Types&rcub; in the component&hyphen;level documentation), and is the earliest time at which the timeout may occur&period; The `mutex` remains locked by the calling thread upon returning from this function&period; Return 0 on success, `e&lowbar;TIMED&lowbar;OUT` on timeout, and a non&hyphen;zero value different from `e&lowbar;TIMED&lowbar;OUT` if an error occurs&period; The behavior is undefined unless `mutex` is locked by the calling thread prior to calling this method&period; Note that spurious wakeups are rare but possible, i&period;e&period;, this method may succeed (return 0) and return control to the thread without the condition object being signaled&period; Also note that the actual time of the timeout depends on many factors including system scheduling and system timer resolution, and may be significantly later than the time requested&period;
| xref:BloombergLP/bslmt/ConditionImpl-00/wait.adoc[`wait`] 
| Atomically unlock the specified `mutex` and suspend execution of the current thread until this condition object is &quot;signaled&quot; (i&period;e&period;, either `signal` or `broadcast` is invoked on this object in another thread), then re&hyphen;acquire a lock on the `mutex`&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Spurious wakeups are rare but possible&semi; i&period;e&period;, this method may succeed (return 0), and return control to the thread without the condition object being signaled&period; The behavior is undefined unless `mutex` is locked by the calling thread prior to calling this method&period; Note that `mutex` remains locked by the calling thread upon return from this function&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
