I did not mean to indicate that making the world safe for the two
different idioms (construct-publish and construct-initialize-publish) were
truly identical, but that they were probably of comparable difficulty, and
that any solution to the former could easily be turned into a solution to
the latter. I still believe this to be the case.
In particular, I believe that padding to the next cache line in the
nursery isn't sufficient to rehabilitate the former (construct-publish)
idiom. Consider Strings: they contain an array that must be modified after
it is created. If I can get a reference to a String that contains a
(private) reference to an array that appears not to be in its correct state,
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 firstname.lastname@example.org 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:15 EDT