Re: JavaMemoryModel: Class initialization safety is hard

From: Joshua Bloch (jbloch@eng.sun.com)
Date: Fri Jul 09 1999 - 16:48:11 EDT


Bill,

   I don't understand your example, but I do agree with Doug: the current
JLS (S. 12.4.2, P. 226) *does* take care of class initialization. Roughly
speaking, it says that at every possible "point of initialization" [their
wording], a thread must (effectively) execute a synchronized method that
initializes the class if it's not already initialized. This seems
sufficient (if potentially costly).

                                            Josh

-------------------------------
This is the JavaMemoryModel mailing list, managed by Majordomo 1.94.4.

To send a message to the list, email JavaMemoryModel@cs.umd.edu
To send a request to the list, email majordomo@cs.umd.edu and put
your request in the body of the message (use the request "help" for help).
For more information, visit http://www.cs.umd.edu/~pugh/java/memoryModel



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