[concurrency-interest] Volatile array and Wait

Vijay nathani.vijay at gmail.com
Tue Oct 18 00:20:56 EDT 2005

Question 1)
I have an array e.g. 
    volatile long[] a1 = new long[100];

Now, is the object a1 volatile or every element of array a1 is volatile or both?
i.e. Is the value we assign to a1 volatile or every long value in the array volatile or both of the previous options are true?

Question 2)
When we come out of wait state, is it the same thing as entering a synchronized block? Will all the variables be taken from RAM again instead of from the register buffer?

Thanks for you help. This is very helpful mailing list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20051018/da25c5be/attachment.htm

More information about the Concurrency-interest mailing list