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