[#BloombergLP-bslmt-Latch-tryWait]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Latch.adoc[Latch]::tryWait
:relfileprefix: ../../../
:mrdocs:

Return `true` if this latch has already been released (i&period;e&period;, the number of events the latch is waiting on is 0), and `false` otherwise&period; This method does not block&period; Note that a return value of `true` indicates a permanent state change (the latch has released and will never be un&hyphen;released), but a return value of `false` is ephemeral and cannot typically be acted upon without additional external state information&period; Also note that a return value of `true` does not guarantee this object is safe to destroy&period;

== Synopsis

Declared in `&lt;bslmt&lowbar;latch&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
bool
tryWait() const;
----


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