Hacker News new | ask | show | jobs
by divs1210 2956 days ago
Thread-unsafe `println` is one of Clojure's quirks too!
1 comments

Interesting, I think it's thread-safe in Rust because one of the common performance improvements for console applications with lots of output is to acquire the relevant stream's lock (and perform all writes against a never-released guard) otherwise it's going to be acquired and dropped on every write: https://doc.rust-lang.org/src/std/io/stdio.rs.html#448-461