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).
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 email@example.com 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