3 ms·
To be clear, unsafe code is not required to use shared state (even shared mutable state with atomics/locks). The unsafe code is encapsulated in the standard lib
by pcwalton 12y ago
To be clear, unsafe code is not required to use shared state (even shared mutable state with atomics/locks). The unsafe code is encapsulated in the standard library and the types are set up such that it enforces safe, data-race-free usage of the primitives.
- steveklabnik 12y agoRight, the unsafe is an implementation detail. I guess I still consider that 'using' unsafe even if you didn't write it yourself.