3 ms·
Rust pro tip: use type alias. As for using lock() - you'd have to do it in any language in some way. If you have sharing and mutability, you need some kind of s
by pkolaczk 4y ago
Rust pro tip: use type alias.
As for using lock() - you'd have to do it in any language in some way. If you have sharing and mutability, you need some kind of synchronization.
- nyanpasu64 4y agoOnly in Rust you need synchronization when accessing an object from multiple places on the same thread.
- steveklabnik 4y agoYou don’t need full synchronization if you’re not going cross threads. RefCell and the like don’t use atomic operations or barriers or anything fancy like that.