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

Lock the reader&sol;writer lock for write&period; The call will block until all active read locks or active&sol;pending write locks are released&period; When the reader&sol;writer lock is locked for write, all read&sol;write lock attempts will either fail or block until the lock is released&period; Use `unlock` to release the lock&period;

== Synopsis

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

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


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