[#BloombergLP-bslmt-ReaderWriterLock-unlock]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ReaderWriterLock.adoc[ReaderWriterLock]::unlock
:relfileprefix: ../../../
:mrdocs:

Release a previously acquired read or write lock&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
unlock();
----

== Description

Release a read lock that was previously acquired from a successful call to `lockRead`, `lockReadReserveWrite`, or `tryLockRead`, or a write lock which was previously acquired by a successful call to `lockWrite`, `tryLockWrite`, or `upgradeToWriteLock`&period; Note that the behavior is undefined unless the calling thread currently owns this read&sol;write lock&period;


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