At 5:39 PM -0700 7/7/01, Joseph Bowbeer wrote:
>Bill Pugh writes:
>> I would like to try to get this settled so we can move on to other
>> fun topics (like object initialization and final fields). David Holmes
>> expressed some reservations, but generally people seem to be
>> OK with "roach motel" ordering:
>I also have reservations about "roach motel" ordering.
>I'd rather err on the side of caution in this case. I'm also wondering just
>how critical the performance of volatile is.
One of my major questions is: what applications/idioms need full
two-way memory barriers for volatiles. The only example I know of is
the simple version of Rob's optimistic reader's pattern, and that one
was so complicated and subtle it was deemed worthy of an ECOOP
publication. All of the other known uses of volatile just seem to
work correctly using the "roach motel" ordering.
If we know of a fair number of reasonable examples that required the
full memory barriers, I would be be more hesitant about "roach motel"
So does anyone have any examples that require full memory barriers
for volatiles (besides the optimistic readers pattern)?
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:32 EDT