Searched refs:MutexGuard (Results 1 – 3 of 3) sorted by relevance
38 pub struct MutexGuard<'a, T: 'a> { struct61 pub fn lock(&self) -> MutexGuard<T> { in lock()83 return MutexGuard { lock: self }; in lock()91 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32> { in try_lock()100 return Ok(MutexGuard { lock: self }); in try_lock()149 impl<T> Deref for MutexGuard<'_, T> { implementation158 impl<T> DerefMut for MutexGuard<'_, T> { implementation165 impl<T> Drop for MutexGuard<'_, T> { implementation
14 mutex::MutexGuard,73 pub fn sleep_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_unlock_mutex()95 pub fn sleep_uninterruptible_unlock_mutex<T>(&self, to_unlock: MutexGuard<T>) { in sleep_uninterruptible_unlock_mutex()
49   当需要读取、修改Mutex保护的数据时,请先使用Mutex的`lock()`方法。该方法会返回一个`MutexGuard`。您可以使用被保护的数据的成员函数来进行一些操作。或…56 let mut g :MutexGuard<Vec<i32>>= x.lock();106 pub fn lock(&self) -> MutexGuard<T>120 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32>