News for hackers. Stuff that matters.
Re:How Rust Achieves Thread Safety by detrino on Sunday June 28, 2015 @04:46PM (#9795023)
From wikipedia:

    A race condition or race hazard is the behavior of an
    electronic, software or other system where the output is
    dependent on the sequence or timing of other
    uncontrollable events.
Example: https://gist.github.com/anonymous/eb72f1091bd1592df552

Output:

    $ for i in {0..10000}; do ./race; done | sort | uniq
    0
    1
Re:How Rust Achieves Thread Safety by steveklabnik on Sunday June 28, 2015 @04:55PM (#9795056)
"Data race" is a more specific term than "race condition."

See http://blog.regehr.org/archives/490 for more. But the TL;DR is:

A data race happens when there are two memory accesses in a program where both:

    * target the same location
    * are performed concurrently by two threads
    * are not reads
    * are not synchronization operations
I would argue you have a race condition but not a data race.
Re:How Rust Achieves Thread Safety by dbaupp on Sunday June 28, 2015 @04:52PM (#9795049)
Ah, that's a race condition, something that Rust doesn't protect against in general (it's fairly difficult: whether a piece of non-determinism is a race condition depends on the semantics the programmer desires). A data race is more specialised, and we try to be careful to use "data race" when discussing this aspect of Rust.

http://blog.regehr.org/archives/490 has a fairly good discussion of the generally accepted definition of data race.