Hello. The problems with the JMM are pretty confusing. Basically what I
know is to try not to avoid synchronization. But, there must be /some/
techniques that are okay to do. Two that come to mind are:
(1) A latch. If you've got a boolean in a class called something like
"initialized" that begins being false and is eventually true forever... I
assume that another thread will /eventually/ see that it is initialized in a
reasonably small amount of time even though there is no explicit memory
barrier.
(2) Copy on write. Again, I assume that another thread will /eventually/
see the new reference to whatever was replaced in a reasonably small amount
of time even though there is no explicit memory barrier.
Am I on the right track here or am I delusional? :-/
-- Dave Smiley
-------------------------------
JavaMemoryModel mailing list - http://www.cs.umd.edu/~pugh/java/memoryModel
This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:30 EDT