absl::Mutex::try_lock

Tries to acquire this Mutex exclusively without blocking.

Synopsis

Declared in <absl/synchronization/mutex.h>

[[nodiscard]]
bool
try_lock();

Return Value

true if the mutex was acquired, false otherwise.

NOTE

The return value should not be discarded.