3 ms·
> Other languages won't tell you if you forgot to use the mutex somewhere. Languages like C++ and D treat this as a library design challenge, not a core langua
by fooker 8y ago
> Other languages won't tell you if you forgot to use the mutex somewhere.
Languages like C++ and D treat this as a library design challenge, not a core language feature. Look at std::lock_guard, for example.
- pornel 8y agoThe Rust language doesn't know anything about locking, or even threads. The thread safety is built using Send/Sync traits, which libraries for threading and synchronization primitives, atomics, etc. implement accordingly.