3 ms·
All of the standard library primitives that let you view writes from other threads (mutexes and mpsc senders) have memory barriers in them at some point. The l
by Manishearth 10y ago
All of the standard library primitives that let you view writes from other threads (mutexes and mpsc senders) have memory barriers in them at some point.
The language itself doesn't know about memory barriers. It gives you the tools for enforcing thread safety provided your synchronization abstractions have memory barriers in the right place.