Expand description
Single-threaded async-aware RwLock. A single-threaded async-aware RwLock implementation.
This module provides LocalRwLock, which is similar to async_lock::RwLock
but optimized for single-threaded async runtimes. It avoids atomic operations
and is !Send + !Sync, making it more efficient when thread safety is not needed.
Like async_lock::RwLock, it provides read_rc() and write_rc() methods
that allow callers to asynchronously wait for the lock to become available,
and return guards with 'static lifetimes by holding an Rc to the lock.
Structsยง
- Local
RwLock - The main lock type.
- Local
RwLock ๐Inner - Local
RwLock Read Guard - A read guard with a
'staticlifetime, holding anRcto the lock. - Local
RwLock Write Guard - A write guard with a
'staticlifetime, holding anRcto the lock. - Read
Future - Future returned by
read_rc(). - Write
Future - Future returned by
write_rc().
Enumsยง
- Lock
State ๐