Struct std::sync::Mutex
[−]
[src]
pub struct Mutex<T: ?Sized> { lock: AtomicBool, value: UnsafeCell<T>, }
A mutex, i.e. a form of safe shared memory between threads. See rust std's Mutex.
Fields
lock | |
value |
Methods
impl<T> Mutex<T>
impl<T: ?Sized> Mutex<T>
fn lock(&self) -> Result<MutexGuard<T>, ()>
[−]
Lock the mutex