So the previous use of volatile for a boolean seems like a textbook
case, but the situation i discovered was pretty clear cut. I have no
other explanation than a highly delayed volatile read (which are
allowed).

-ryan

On Thu, Apr 15, 2010 at 3:34 PM, Todd Lipcon <t...@cloudera.com> wrote:
> On Thu, Apr 15, 2010 at 3:00 PM, Ryan Rawson <ryano...@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
>
> --
> Todd Lipcon
> Software Engineer, Cloudera
>

Reply via email to