Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Volatile keyword Date: Wed, 14 Dec 2011 22:35:03 +0100 Lines: 33 Message-ID: <9ksj4eFc7oU1@mid.individual.net> References: <41fa02ff-3f20-41bc-90d9-c3f7d3651fbf@n6g2000vbg.googlegroups.com> <9kodm9FfqrU1@mid.individual.net> <9ks8r2Fld4U1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: individual.net iR8sA5RS9t7QOcyd80nB4g9Ex/YH2Zy3W2PMzP2YHxsQ7G49g= Cancel-Lock: sha1:wqcPQCo10QxJwJ2qwLRyDwwB91U= User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10748 On 14.12.2011 20:00, Patricia Shanahan wrote: > On 12/14/2011 10:39 AM, Robert Klemme wrote: >> On 12/13/2011 08:54 AM, Peter Duniho wrote: >>> On 12/12/11 11:37 PM, Robert Klemme wrote: >>>> [...]Bottom line is that the JVM spec does not make >>>> any guarantees here (=A717.7 see Lew's reference). >>> >>> I think it's worth being careful about "does not make any guarantees >>> here". The implication of 17.7 is that there _is_ in fact a guarantee= , >>> for certain 64-bit fields marked as "volatile". Specifically, those >>> which are of the type "double" or "long". This is true even on 32-bit= >>> systems. >> >> And what guarantee is there? Can you unambiguously formulate that and >> provide reference to the JLS so everybody can check it? > > As indicated in the quoted material, the relevant section is > "17.7 Non-atomic Treatment of double and long" > http://java.sun.com/docs/books/jls/third_edition/html/memory.html#61803= Thank you Patricia and Daniel for helping my feeble eyes! Kind regards robert --=20 remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/