Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Even in Go, concurrency is still not easy. Parent comment
Since you're asking, Rust's ownership/type system, for example, has checks in place that prevent at least some classes of concurrency errors.
For example, you can't directly modify a variable from multiple threads, due to the so-called "move" rules:
let mut myvar = vec![]; thread::spawn(move || { myvar.push(1); }); myvar.push(1); // can't do this; variable has been moved
There are no comments on this comment yet.
Since you're asking, Rust's ownership/type system, for example, has checks in place that prevent at least some classes of concurrency errors.
For example, you can't directly modify a variable from multiple threads, due to the so-called "move" rules: