News for hackers. Stuff that matters.
Re:Thread Safety in C++ and Rust by haberman on Sunday December 19, 2021 @12:22PM (#29615896)
"Read" here is shorthand for "call a const method". You can write const methods that are not safe to call concurrently: for example, they could use "mutable" or "const cast" to perform mutation, or they could access a non-const pointer to shared state. If a type had a const method like this, the type would no longer be considered thread-compatible.

There are no comments on this comment yet.