Trait concurrency_traits::mutex::TimeoutMutex [−][src]
pub trait TimeoutMutex<'a>: TryMutex<'a> { fn lock_timeout(&'a self, timeout: Duration) -> Option<Self::Guard>; }
Expand description
A mutex that can timeout for locking
Implementation
It is recommended to implement TimeoutMutexSized
if the implement-ee can
be sized.
Required methods
fn lock_timeout(&'a self, timeout: Duration) -> Option<Self::Guard>
[src]
fn lock_timeout(&'a self, timeout: Duration) -> Option<Self::Guard>
[src]Locks the mutex blocking for timeout or until locked
Implementors
impl<'a, T, M> TimeoutMutex<'a> for CustomMutex<T, M> where
T: 'a,
M: RawTimeoutMutex + 'a,
[src]
impl<'a, T, M> TimeoutMutex<'a> for CustomMutex<T, M> where
T: 'a,
M: RawTimeoutMutex + 'a,
[src]