mutex
A lock that lets only one thread at a time use the data inside it.
Mutex
Loading interactive…
Examples
*tally.lock().unwrap() += 1;on aMutex<i32>adds one while holding the lock, and releases it at the end of that statement.
See also
A lock that lets only one thread at a time use the data inside it.
Mutex
Loading interactive…
Examples
*tally.lock().unwrap() += 1; on a Mutex<i32> adds one while holding the lock, and releases it at the end of that statement.
See also