pub struct LockGuard {
pub lock: Lock,
}
Expand description
Upon dropping the guard, LockManager::unlock
will be ran synchronously on the executor.
This is known to block the tokio runtime if this happens inside of the context of a tokio runtime
if tokio-comp
is enabled as a feature on this crate or the redis
crate.
To eliminate this risk, if the tokio-comp
flag is enabled, the Drop
impl will not be compiled,
meaning that dropping the LockGuard
will be a no-op.
Under this circumstance, LockManager::unlock
can be called manually using the inner lock
at the appropriate
point to release the lock taken in Redis
.
Fields§
§lock: Lock
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LockGuard
impl RefUnwindSafe for LockGuard
impl Send for LockGuard
impl Sync for LockGuard
impl Unpin for LockGuard
impl UnwindSafe for LockGuard
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more