Returns `Some(true)` if able to successfully lock without blocking, `Some(false)` otherwise, and `None` when the mutex is already locked on the current thread.
(&self)
| 69 | /// Returns `Some(true)` if able to successfully lock without blocking, `Some(false)` |
| 70 | /// otherwise, and `None` when the mutex is already locked on the current thread. |
| 71 | pub fn try_lock(&self) -> Option<bool> { |
| 72 | self.lock_internal(|| self.mutex.try_lock()) |
| 73 | } |
| 74 | |
| 75 | /// Unlocks this mutex. The inner mutex may not be unlocked if |
| 76 | /// this mutex was acquired previously in the current thread. |
no test coverage detected