...
Code Block | ||
---|---|---|
| ||
class Safe { AtomicIntegerArray air = new AtomicIntegerArray(5); // other code } air.set(1, 10); |
Risk Assessment
Assuming The assumption that the contents of a an array declared volatile
, are volatile
can lead to stale reads.
...
...
Code Block | ||
---|---|---|
| ||
class Safe { AtomicIntegerArray air = new AtomicIntegerArray(5); // other code } air.set(1, 10); |
Assuming The assumption that the contents of a an array declared volatile
, are volatile
can lead to stale reads.
...