Crate bonsaidb_utils
source · [−]Macros
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.
Acquires a read handle to an async-lock::RwLock
by first attempting
try_read()
and then falling back on read().await
. This is proven to be
faster than simply calling read().await
in our
benchmarks.
Acquires a write handle to an async-lock::RwLock
by first attempting
try_write()
and then falling back on write().await
. This is proven to be
faster than simply calling write().await
in our
benchmarks.