3 ms·
>As someone who grew up on the Java VM and started my start-up/web career on it, I've always felt like Java programmers have a different relationship with threa
by valarauca1 9y ago
>As someone who grew up on the Java VM and started my start-up/web career on it, I've always felt like Java programmers have a different relationship with threads than C programmers. Java gives you cross-platform, usable, debuggable native threads; it basically makes them free if you want them. In C/C++, on the other hand, threads are a library, and using them is a grungy affair.
The difference is Java threads work within the constraints of the JVM memory model. Which is very well specified and understood. It is implemented in the JVM and the JVM guarantees your platform will follow it.
While C/C++ do what ever the hardware dictates.
https://dzone.com/articles/java-memory-model-programer%E2%80%99s https://dzone.com/articles/java-memory-model-programer%E2%80...
- dgreensp 9y agoThat's part of it, for sure.