Suppose our code has 2 threads (A and B) have a reference to the same instance of this class somewhere:
public class MyValueHolder {
private int value = 1;
jcstress maintainer here. There are multiple ways to answer that question.
-XX:+StressLCM -XX:+StressGCM
, effectively doing the instruction scheduling fuzzing. Chances are the load in question will float somewhere you can detect with the regular tests your product has.