News for hackers. Stuff that matters.
Re:How Rust Achieves Thread Safety by pcwalton on Sunday June 28, 2015 @08:58PM (#9795868)
That's right, and Rust bans that. The definition of "concurrently" typically means "without synchronization in between". An atomic access is by definition a form of synchronization.
Re:How Rust Achieves Thread Safety by detrino on Sunday June 28, 2015 @09:58PM (#9796055)
Relaxed access of atomics performs no synchronization.
Re:How Rust Achieves Thread Safety by burntsushi on Sunday June 28, 2015 @11:20PM (#9796245)
"Relaxed atomic operations can be reordered in both directions, with respect to either ordinary memory operations or other relaxed atomic operations. But the requirement that updates must be observed in modification order disallows this if the two operations may apply to the same atomic object. (The same restriction applies to the one-way reordering of acquire/release atomic operations.)"

http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n233...

There is a lot more explanation here that should cast some light on the situation: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n248...

Re:How Rust Achieves Thread Safety by Gankro on Sunday June 28, 2015 @10:45PM (#9796157)
It guarantees that the value read was some value that was in the variable at some point. e.g. it prevents a value that toggles from 3 to 5 being read as 117. It also prevents writes from being eaten (e.g. an increment always actually occurs).

This necessitates some level of synchronization.

Re:How Rust Achieves Thread Safety by Manishearth on Monday June 29, 2015 @01:30AM (#9796565)
(It also guarantees happens-before for a given thread, so if a thread changes it from three to 5 and other threads are not changing it back, that thread will never read a 3 again. This also needs some level of synchronization)