|
|
|
|
|
by Nauxuron
216 days ago
|
|
> You can't even access the data without locking the mutex. It's even nicer than that: you can actually access data without locking the mutex, because while you hold a mutable borrow to the mutex, Rust statically guarantees that no one else can acquire locks on the mutex. https://doc.rust-lang.org/std/sync/struct.Mutex.html#method.... |
|
Mutex is for where you have that ability, and ensures at runtime that accesses get serialized.