pub struct CacheLock { /* private fields */ }Expand description
The global cache locking manager
Implementations§
Source§impl CacheLock
impl CacheLock
Sourcepub fn new_boxed(age_timeout: Duration) -> Box<Self>
pub fn new_boxed(age_timeout: Duration) -> Box<Self>
Create a new CacheLock with the given lock timeout
Age timeout refers to how long a writer has been holding onto a particular lock, and wait timeout refers to how long a reader may hold onto any number of locks before giving up. When either timeout is reached, the read locks are automatically unlocked.
Sourcepub fn new(age_timeout_default: Duration) -> Self
pub fn new(age_timeout_default: Duration) -> Self
Create a new CacheLock with the given lock timeout
Age timeout refers to how long a writer has been holding onto a particular lock, and wait timeout refers to how long a reader may hold onto any number of locks before giving up. When either timeout is reached, the read locks are automatically unlocked.
Trait Implementations§
Source§impl CacheKeyLock for CacheLock
impl CacheKeyLock for CacheLock
Auto Trait Implementations§
impl !Freeze for CacheLock
impl !RefUnwindSafe for CacheLock
impl Send for CacheLock
impl Sync for CacheLock
impl Unpin for CacheLock
impl UnwindSafe for CacheLock
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