Re: JavaMemoryModel: Problem on single processor

From: Allen Holub (
Date: Fri May 26 2000 - 00:07:32 EDT

Bill Pugh said:

>No one should be thinking of monitor enter/exit as a memory barrier, and I would argue against adding explicit memory barriers to Java.

I'm in violent agreement with Bill, here. The notions underlying relaxed memory aren't universally understood, and in any event, requiring the programmer to solve the problem manually by using some semantic mechanism is not going to solve the real problem of people inadvertently writing incorrect code. People don't use "synchronized" properly as it is; I shudder to think what they'd do with an explicit memory barrier. It's better to redefine the way that the JVM works so that the language will behave the way that people intuitively expect it to behave; let the compiler and JVM between them take care of the mechanics.


JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:25 EDT