Charles Oliver Nutter wrote:
[...]
* How quickly do you want all threads to see that a callsite is invalid?

In JRuby right now it's expected that you are not going to be doing
method table changes (class mutation) across running threads. So the
poll from the callsite to the class is non-volatile. It's possible for
a thread to not see that a class has changed right away (or following
the memory model to the letter...it might never see it) if the change
happens in another thread and nothing causes the appropriate flags to
propagate to the current thread. It is, at some level, "piggy-backing"
on other memory barriers.

If you need the change to be visible immediately, I don't see any
other way with Java5/6 than using volatiles.

I was thinking about changing semantics to say if one thread does a modification another thread will see it eventually. If the user wants to ensure it is visible he has to use synchronization by himself.

My problem is more, that if I want to use non-volatile reads, then all the reads do have to access immutable data. And this is, what is causing me headaches.

bye Jochen

--
Jochen "blackdrag" Theodorou
The Groovy Project Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

--
You received this message because you are subscribed to the Google Groups "JVM 
Languages" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jvm-languages?hl=en.

Reply via email to