4 ms·
Am I missing something, or does your first question answer itself? The question asserts a specific difference. (I don't remember how it works in Java to know i
by mkl 8y ago
Am I missing something, or does your first question answer itself? The question asserts a specific difference. (I don't remember how it works in Java to know if the assertion is correct.)
- bakery2k 8y agoAs I understand it, the JVM can assume that local variables are not modified by other threads. My question is why can't CPython make the same assumption?
- anowlcalledjosh 8y agoBecause it's not true! Threads in Python can muck around with the state of any other thread, at any time – it would be a language change to assume otherwise.
- maayank 8y agoWhat op means is that it’s not true in Java as well, but the JVM assumes it is true until detecting otherwise