[#AnnotatedMixin-03-try_lock]
= xref:AnnotatedMixin-03.adoc[AnnotatedMixin]::try&lowbar;lock
:relfileprefix: ../
:mrdocs:

Try to lock the underlying mutex without blocking&period;

== Synopsis

Declared in `&lt;sync&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;try&lowbar;acquire&lowbar;capability(true)&rsqb;&rsqb;
bool
try&lowbar;lock();
----

== Return Value

true if the lock was acquired&period;


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