[#absl-Mutex-WriterTryLock]
= xref:absl.adoc[absl]::xref:absl/Mutex.adoc[Mutex]::WriterTryLock
:relfileprefix: ../../
:mrdocs:

Deprecated writer alias for `try&lowbar;lock()`&period;

== Synopsis

Declared in `&lt;absl&sol;synchronization&sol;mutex&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated, nodiscard&rsqb;&rsqb;
bool
WriterTryLock();
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

`true` if the mutex was acquired, `false` otherwise&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====

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