When using multiple processors, the value of a variable may be altered but not visible to other cores that may require the same variable.
Marking a variable as volatile allows the compiler and runtime to prevent optimisations and improve the variable visibility so that errors are not introduced at runtime caused by this.
Note that the restrictions caused by the volatile keyword can reduce the performance of the application when utilising this variable so some care should be taken.
siddhu Math
Ranch Hand
Joined: Aug 10, 2006
Posts: 46
posted
0
hi,
Hope the link should help you , has quite a lot of information on volatile....volatile....
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.