Brian Hurt wrote:
[...]
Have you considered using java.util.concurrent.atomic.AtomicReference variables?
>
I'm thinking of a design something like this: every object of a class has a reference to the AtomicReference that holds its class definition. All objects of the same class all point to the same AtomicReference (this is why there is a double indirection). Getting the current class definition compiles down into just two memory accesses- not perfect, but not bad. When the class definition is changed, the change updates the atomic reference, which updates all the classes simultaneously.

I'm not sure what behavior you want, but something like this might work.

ok, but what do you do with objects from classes you have no control over?

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