[#BloombergLP-bslmt-Once-leave]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/Once.adoc[Once]::leave
:relfileprefix: ../../../
:mrdocs:

Mark one&hyphen;time execution as complete and unlock the internal mutex&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
leave(xref:BloombergLP/bslmt/Once/OnceLock.adoc[OnceLock]* onceLock);
----

== Description

Set this object into a state such that pending and future calls to `enter` or `callOnce` will return `false` or do nothing, respectively, then unlock the internal mutex using the specified `onceLock` (possibly unblocking pending calls to `enter` or `callOnce`)&period; The behavior is undefined unless `onceLock` was locked by a matching call to `enter` on this object and has not been tampered&hyphen;with since&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *onceLock*
| lock token previously locked by a matching `enter`
|===


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