|
|
|
|
|
by mumblemumble
1816 days ago
|
|
In a lot of code I've seen, there are threads polling some variable without using any sort of special guard. The assumption (based, I assume, on how you really could get away with this back in the days of single-core, single-CPU computers) is that you only need to worry about race conditions when writing to primitive variables, and that simply reading them is always safe. |
|
[1] https://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html...