[#BloombergLP-bslmt-Condition-wait] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Condition.adoc[Condition]::wait :relfileprefix: ../../../ :mrdocs: Atomically unlock the specified `mutex` and suspend execution of the current thread until this condition object is "signaled" (i.e., either `signal` or `broadcast` is invoked on this object in another thread), then re‐acquire a lock on the `mutex`. Return 0 on success, and a non‐zero value otherwise. Spurious wakeups are rare but possible; i.e., this method may succeed (return 0), and return control to the thread without the condition object being signaled. The behavior is undefined unless `mutex` is locked by the calling thread prior to calling this method. Note that `mutex` remains locked by the calling thread upon return from this function. == Synopsis Declared in `<bslmt_condition.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int wait(xref:BloombergLP/bslmt/Mutex.adoc[Mutex]* mutex); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#