top | item 46377290

(no title)

whytevuhuni | 2 months ago

I see, most likely thread-safety then. Rust will prevent accessing data shared between threads unless you first lock a mutex, use an atomic, etc.

Or rather, it gives abstractions so that higher-level types in stdlib and other libraries can prevent such access. The low-level implementation of the Mutex/etc types themselves do the same thing C and C++ do, via unsafe blocks, atomic primitives, fences, etc.

discuss

order

No comments yet.