hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Todd Lipcon <t...@cloudera.com>
Subject Re: volatile considered harmful
Date Thu, 15 Apr 2010 22:34:17 GMT
On Thu, Apr 15, 2010 at 3:00 PM, Ryan Rawson <ryanobjc@gmail.com> wrote:

> In short, the use of volatile is not guaranteed to see an update from
> a different thread in any timely manner. The Java Memory Model does
> not ensure this.

Are you sure?
http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#volatile seems
to indicate it does, and I've always believed it does as well.

The incrementing thing is obvious, though :)


Todd Lipcon
Software Engineer, Cloudera

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message