Have a scenario where multiple threads have race condition on comparison code.
private int volatile maxValue; public getNextValue() { int latestValue = ...;