Macro bonsaidb_utils::fast_async_lock
source · macro_rules! fast_async_lock { ($mutex:expr) => { ... }; }
Expand description
Acquires an async-lock::Mutex by first attempting try_lock() and then
falling back on lock().await. This is proven to be faster than simply
calling lock().await in our
benchmarks.