Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: markspace <-@.> Newsgroups: comp.lang.java.programmer Subject: Re: reading the JLS (17.4.5) Date: Tue, 20 Dec 2011 10:50:53 -0800 Organization: A noiseless patient Spider Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 20 Dec 2011 18:50:55 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="XjIWM99mD7Ijfdu600oVPA"; logging-data="6009"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18BSUDFXBi39ojnDfHFss4QTxri6hYUTDA=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 In-Reply-To: Cancel-Lock: sha1:bnv8S/LvHhl5Qgh0uCMxxsgQa7E= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10909 On 12/20/2011 9:54 AM, Andreas Leitgeb wrote: > I guess, I got confused about the implications of the property, > based on that it was defined as a property of a set of actions, > rather than as a property of a conforming JVM-implementation. I'm not sure why those exceptions are there, but that little paragraph is a pretty common sense, cya exception. You wont see a write if it hasn't happened yet, and you wont see the effect of a write if someone else wrote something there subsequently, before your read. "Conforming JVM" is a pretty good guess, I think, but personally I couldn't say. Patricia had some thoughts on reordering by hardware, but that involved synchronization and memory barriers, and I don't recall seeing those discussed in the small JLS section in question. I think this JLS section applies more generally than a read or write getting moved out of a synchronization block. I think it applies absolutely everywhere.