[concurrency-interest] Volatile array and Wait

Mike Skells mike.skells at ebizz-consulting.com
Thu Oct 20 10:22:44 EDT 2005

On the consideration of a no op ...

  volatile Object[] b = new Object[50];
  b = b;      // volatile write

Isnt the compiler/jit liable to remove the b=b statement, through the normal
rules of elimination of redundent code, or is this explicitely barred for
volatile variables

Similarly if a variable is never read, or never written, and is private then
it can be eliminated cant it


More information about the Concurrency-interest mailing list