[#BloombergLP-bslmt-ReaderWriterMutexImpl-tryLockWrite] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/ReaderWriterMutexImpl.adoc[ReaderWriterMutexImpl]::tryLockWrite :relfileprefix: ../../../ :mrdocs: Attempt to lock this reader‐writer mutex for writing. Immediately return 0 on success, and a non‐zero value if there are active or pending locks on this mutex. If successful, `unlockWrite` or `unlock` must be used to release the lock on this mutex. The behavior is undefined if this method is called from a thread that already has a lock on this mutex. == Synopsis Declared in `<bslmt_readerwritermuteximpl.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int tryLockWrite(); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#