Glossary: Rust Beyond the Basics
Mutex
Also written: Mutex<T>, lock, mutual exclusion
A lock that lets only one thread or task at a time reach the value inside. `lock()` waits for its turn and returns a guard; dropping the guard releases the lock.
Glossary: Rust Beyond the Basics
Also written: Mutex<T>, lock, mutual exclusion
A lock that lets only one thread or task at a time reach the value inside. `lock()` waits for its turn and returns a guard; dropping the guard releases the lock.