News for hackers. Stuff that matters.
Re:Even in Go, concurrency is still not easy by pizza234 on Thursday September 03, 2020 @02:13AM (#24361204)
I believe it's correct that that can be "said for most languages".

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.