...
Declaring a shared variable as volatile guarantees thread-safety only when both of the following conditions are met:
...
...
Declaring a shared variable as volatile guarantees thread-safety only when both of the following conditions are met:
...