4 ms·
Ok you can compare products, but you still have to use/compare them without making any obvious mistakes. Using the Rust example, you could say “Rust is not saf
by justsomeuser 5y ago
Ok you can compare products, but you still have to use/compare them without making any obvious mistakes.
Using the Rust example, you could say “Rust is not safe because I can wrap my code in unsafe{} and that corrupts my data when I fork”.
The OPs point is “when I run two threads that write to the same memory I get corrupt data”.
The first point of call is not “well it’s Samsung memory, so Samsung make terrible memory modules, I shall run my incorrect programs on Sony henceforth”.
It’s “why are you expecting your incorrect program to even work”.
- yaur 5y agoActually fork does not create two threads it creates two processes which should "share memory" only in the "copy on write" sense. There is no undefined behavior implied here. When developers misunderstand the difference between thread and process boundaries (as in the case of the SQLite devs) things ca go to total shit real fast. If you replace "Samsung" with Unix and "Sony" with Microsoft your other statements are correct. That's the problem.